diff --git a/src/server/implementation/users.ts b/src/server/implementation/users.ts index 884796f..548c911 100644 --- a/src/server/implementation/users.ts +++ b/src/server/implementation/users.ts @@ -62,6 +62,15 @@ async function defaultCreateOrUpdateUser( existingUserId, ...args, }); + } else { + if ( + existingUserId && + ctx.db.normalizeId("users", existingUserId) === null + ) { + throw new Error( + `User ID \`${existingUserId}\` is not in the \`users\` table`, + ); + } } const {