aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/utils.ts
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-08-15 13:47:29 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-08-15 13:47:29 +0200
commit819949d7f2cfcce8d334cbfdb701255daac64951 (patch)
tree592043554f59ec209f9afc1c31c20c4fb585c3ca /packages/demobank-ui/src/utils.ts
parent77ea209ddb6d457db0ce113f91247207cc29fbd8 (diff)
parentadb0e70f151e63d103f27852312319520f4d0a84 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/demobank-ui/src/utils.ts')
-rw-r--r--packages/demobank-ui/src/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/demobank-ui/src/utils.ts b/packages/demobank-ui/src/utils.ts
index e60ba7f3b..4ce0f140e 100644
--- a/packages/demobank-ui/src/utils.ts
+++ b/packages/demobank-ui/src/utils.ts
@@ -134,7 +134,7 @@ export function buildRequestErrorMessage(
specialCases.onClientError && specialCases.onClientError(cause.status);
result = {
title: title ? title : i18n.str`The server didn't accept the request`,
- description: cause.payload.error.description,
+ description: cause?.payload?.error?.description,
debug: JSON.stringify(cause),
};
break;
@@ -146,7 +146,7 @@ export function buildRequestErrorMessage(
title: title
? title
: i18n.str`The server had problems processing the request`,
- description: cause.payload.error.description,
+ description: cause?.payload?.error?.description,
debug: JSON.stringify(cause),
};
break;
@@ -154,7 +154,7 @@ export function buildRequestErrorMessage(
case ErrorType.UNREADABLE: {
result = {
title: i18n.str`Unexpected error`,
- description: `Response from ${cause.info?.url} is unreadable, status: ${cause.status}`,
+ description: `Response from ${cause?.info?.url} is unreadable, status: ${cause?.status}`,
debug: JSON.stringify(cause),
};
break;