mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
debug: log login error shape
This commit is contained in:
parent
36922cc946
commit
504f77a60c
1 changed files with 9 additions and 0 deletions
|
|
@ -131,6 +131,15 @@ export function createAuthRoutes(
|
|||
|
||||
return c.json(response);
|
||||
} catch (error) {
|
||||
console.log(
|
||||
'[login debug] caught error:',
|
||||
JSON.stringify({
|
||||
msg: (error as any)?.message,
|
||||
status: (error as any)?.status,
|
||||
body: (error as any)?.body,
|
||||
name: (error as any)?.name,
|
||||
})
|
||||
);
|
||||
// Better Auth throws APIError.from("FORBIDDEN", "EMAIL_NOT_VERIFIED") for unverified emails
|
||||
const isEmailNotVerified =
|
||||
(error as any)?.status === 403 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue