diff options
author | Sebastian <sebasjm@gmail.com> | 2023-09-22 18:34:49 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-09-25 14:50:44 -0300 |
commit | 15af6c619de70336bcdfbabbd32b9d93aabefc5b (patch) | |
tree | 5dff83b07f9ffcb26cd4eb595f9e80f549ae25b5 /packages/demobank-ui/src/pages/HomePage.tsx | |
parent | 5640f0a67dcc31fa2b5fa0992abca8a55bc00dd8 (diff) |
towards new core bank api
Diffstat (limited to 'packages/demobank-ui/src/pages/HomePage.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/HomePage.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/demobank-ui/src/pages/HomePage.tsx b/packages/demobank-ui/src/pages/HomePage.tsx index 8d5e1f3b9..d80a57d21 100644 --- a/packages/demobank-ui/src/pages/HomePage.tsx +++ b/packages/demobank-ui/src/pages/HomePage.tsx @@ -120,8 +120,8 @@ export function handleNotOkResult( ) => VNode { return function handleNotOkResult2<T>( result: - | HttpResponsePaginated<T, SandboxBackend.SandboxError> - | HttpResponse<T, SandboxBackend.SandboxError>, + | HttpResponsePaginated<T, SandboxBackend.SandboxError | undefined> + | HttpResponse<T, SandboxBackend.SandboxError| undefined>, ): VNode { if (result.loading) return <Loading />; if (!result.ok) { @@ -139,7 +139,7 @@ export function handleNotOkResult( notify({ type: "error", title: i18n.str`Could not load due to a client error`, - description: errorData.error.description as TranslatedString, + description: errorData?.error?.description as TranslatedString, debug: JSON.stringify(result), }); break; @@ -148,7 +148,7 @@ export function handleNotOkResult( notify({ type: "error", title: i18n.str`Server returned with error`, - description: result.payload.error.description as TranslatedString, + description: result.payload?.error?.description as TranslatedString, debug: JSON.stringify(result.payload), }); break; |