diff options
author | Sebastian <sebasjm@gmail.com> | 2023-10-25 18:26:36 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-10-25 18:26:36 -0300 |
commit | e812eae32daddad372c7629867298ca28678a44c (patch) | |
tree | 98b8de62d15e28c4b4cc94b6c42ec2ab1f20c631 /packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx | |
parent | c31ce9bab8592c31b7c7d879f6daad7886b7486d (diff) | |
download | wallet-core-e812eae32daddad372c7629867298ca28678a44c.tar.xz |
update more error cases handling from bank-core-api
Diffstat (limited to 'packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx b/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx index 895094c28..5e0fa322f 100644 --- a/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx +++ b/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx @@ -110,6 +110,18 @@ export function WithdrawalConfirmationQuestion({ description: resp.detail.hint as TranslatedString, debug: resp.detail, }); + case "invalid-id": return notify({ + type: "error", + title: i18n.str`The operation id is invalid.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + }) + case "not-found": return notify({ + type: "error", + title: i18n.str`The operation was not found.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + }) default: assertUnreachable(resp) } } @@ -129,8 +141,20 @@ export function WithdrawalConfirmationQuestion({ type: "error", title: i18n.str`The reserve operation has been confirmed previously and can't be aborted` }); + case "invalid-id": return notify({ + type: "error", + title: i18n.str`The operation id is invalid.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + }) + case "not-found": return notify({ + type: "error", + title: i18n.str`The operation was not found.`, + description: resp.detail.hint as TranslatedString, + debug: resp.detail, + }) default: { - assertUnreachable(resp.case) + assertUnreachable(resp) } } } |