force user initialisation - fixes #2

This commit is contained in:
Michael Dausmann
2023-04-07 23:28:13 +10:00
parent 59d9d0f684
commit b4b20e4260
5 changed files with 14 additions and 3 deletions

View File

@@ -24,8 +24,8 @@ export async function createContext(event: H3Event){
if(!user || !dbUser) {
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message: `Unable to fetch user data, please try again later. Missing ->[user:${(!user)},dbUser:${(!dbUser)}]`,
code: 'UNAUTHORIZED',
message: `Unable to fetch user data at this time. Missing ->[user:${(!user)},dbUser:${(!dbUser)}]`,
});
}