diff options
Diffstat (limited to 'packages/demobank-ui/src')
-rw-r--r-- | packages/demobank-ui/src/pages/HomePage.tsx | 8 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/LoginForm.tsx | 8 | ||||
-rw-r--r-- | packages/demobank-ui/src/utils.ts | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/packages/demobank-ui/src/pages/HomePage.tsx b/packages/demobank-ui/src/pages/HomePage.tsx index 0a5a61396..d35f4cc6f 100644 --- a/packages/demobank-ui/src/pages/HomePage.tsx +++ b/packages/demobank-ui/src/pages/HomePage.tsx @@ -172,6 +172,14 @@ export function handleNotOkResult( }); break; } + case ErrorType.UNREADABLE: { + notifyError({ + title: i18n.str`Unexpected error.`, + description: `Response from ${result.info?.url} is unreadable, http status: ${result.status}`, + debug: JSON.stringify(result), + }); + break; + } case ErrorType.UNEXPECTED: { notifyError({ title: i18n.str`Unexpected error.`, 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.`, diff --git a/packages/demobank-ui/src/utils.ts b/packages/demobank-ui/src/utils.ts index 0796db65d..af0329555 100644 --- a/packages/demobank-ui/src/utils.ts +++ b/packages/demobank-ui/src/utils.ts @@ -151,6 +151,14 @@ export function buildRequestErrorMessage( }; break; } + case ErrorType.UNREADABLE: { + result = { + title: i18n.str`Unexpected error`, + description: `Response from ${cause.info?.url} is unreadable, status: ${cause.status}`, + debug: JSON.stringify(cause), + }; + break; + } case ErrorType.UNEXPECTED: { result = { title: i18n.str`Unexpected error`, |