Skip to content

Commit

Permalink
chore(core): add kratos message id for unkown errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Nov 10, 2023
1 parent 8779294 commit 486b209
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/api/src/services/kratos/auth-email-no-password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export const AuthWithEmailPasswordlessService = (): IAuthWithEmailPasswordlessSe
return new EmailValidationSubmittedTooOftenError()
}

return new UnknownKratosError("should be a dead branch as 422 error code expected")
return new UnknownKratosError(
`should be a dead branch as 422 error code expected (${res.data.ui.messages?.[0].id})`,
)
} catch (err) {
// the recovery flow assume that the user has an additional action
// after the code has been verified to reset the password.
Expand Down

0 comments on commit 486b209

Please sign in to comment.