From d845c0cf225a0f05214f368f4a98257238f53d07 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 19 Jan 2024 17:09:43 -0300 Subject: fixes #8147 --- packages/demobank-ui/src/pages/RegistrationPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/demobank-ui/src/pages/RegistrationPage.tsx') diff --git a/packages/demobank-ui/src/pages/RegistrationPage.tsx b/packages/demobank-ui/src/pages/RegistrationPage.tsx index 005a0bc2c..e948a5dad 100644 --- a/packages/demobank-ui/src/pages/RegistrationPage.tsx +++ b/packages/demobank-ui/src/pages/RegistrationPage.tsx @@ -177,13 +177,13 @@ function RegistrationForm({ onComplete, onCancel }: { onComplete: () => void, on backend.logIn({ username, token: resp.body.access_token }); } else { switch (resp.case) { - case "wrong-credentials": return notify({ + case HttpStatusCode.Unauthorized: return notify({ type: "error", title: i18n.str`Wrong credentials for "${username}"`, description: resp.detail.hint as TranslatedString, debug: resp.detail, }) - case "not-found": return notify({ + case HttpStatusCode.NotFound: return notify({ type: "error", title: i18n.str`Account not found`, description: resp.detail.hint as TranslatedString, -- cgit v1.2.3