From cfe7129c4ecaa3057d5e47040f0a9efd8ed0317e Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 7 Apr 2023 18:46:25 -0300
Subject: adding unreadable http response case and removing deprecated fields

---
 packages/demobank-ui/src/pages/LoginForm.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'packages/demobank-ui/src/pages/LoginForm.tsx')

diff --git a/packages/demobank-ui/src/pages/LoginForm.tsx b/packages/demobank-ui/src/pages/LoginForm.tsx
index 7116e724e..0ea001fe2 100644
--- a/packages/demobank-ui/src/pages/LoginForm.tsx
+++ b/packages/demobank-ui/src/pages/LoginForm.tsx
@@ -160,6 +160,14 @@ export function LoginForm({ onRegister }: { onRegister?: () => void }): VNode {
                         });
                         break;
                       }
+                      case ErrorType.UNREADABLE: {
+                        saveError({
+                          title: i18n.str`Unexpected error.`,
+                          description: `Response from ${cause.info?.url} is unreadable, http status: ${cause.status}`,
+                          debug: JSON.stringify(cause),
+                        });
+                        break;
+                      }
                       default: {
                         saveError({
                           title: i18n.str`Unexpected error, please report.`,
-- 
cgit v1.2.3

