aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/HomePage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/HomePage.tsx')
-rw-r--r--packages/demobank-ui/src/pages/HomePage.tsx8
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;