From 486b209bf9a87c56a29a2f5b594ee0ad9a4a0120 Mon Sep 17 00:00:00 2001 From: Juan P Lopez Date: Thu, 9 Nov 2023 19:10:05 -0500 Subject: [PATCH] chore(core): add kratos message id for unkown errors --- core/api/src/services/kratos/auth-email-no-password.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/api/src/services/kratos/auth-email-no-password.ts b/core/api/src/services/kratos/auth-email-no-password.ts index 9fb334f11c..71c3be64ee 100644 --- a/core/api/src/services/kratos/auth-email-no-password.ts +++ b/core/api/src/services/kratos/auth-email-no-password.ts @@ -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.