fixed verification code handler error when user is deleted

This commit is contained in:
Zai Shi 2025-02-11 11:43:43 -08:00
parent 02d1680d2e
commit 6c75d12cc7

View File

@ -77,6 +77,8 @@ export const signInVerificationCodeHandler = createVerificationCodeHandler({
user = await usersCrudHandlers.adminRead({
tenancy,
user_id: data.user_id,
// This might happen if the user was deleted but the code is still valid
allowedErrorTypes: [KnownErrors.UserNotFound],
});
}