diff options
author | Sebastian <sebasjm@gmail.com> | 2023-10-17 11:17:18 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-10-17 11:17:41 -0300 |
commit | 503cbfbb95828677b83212816951eb501de2a8fe (patch) | |
tree | 9bbb59300069fba59baca66f543c5145911905b5 /packages/taler-util/src/errors.ts | |
parent | aca3bc9423f15354913d0114cafbd4bd1782d801 (diff) | |
download | wallet-core-503cbfbb95828677b83212816951eb501de2a8fe.tar.gz wallet-core-503cbfbb95828677b83212816951eb501de2a8fe.tar.bz2 wallet-core-503cbfbb95828677b83212816951eb501de2a8fe.zip |
bank api now return typed errors for documented errors
Diffstat (limited to 'packages/taler-util/src/errors.ts')
-rw-r--r-- | packages/taler-util/src/errors.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/taler-util/src/errors.ts b/packages/taler-util/src/errors.ts index 07a402413..dcdf56c39 100644 --- a/packages/taler-util/src/errors.ts +++ b/packages/taler-util/src/errors.ts @@ -34,6 +34,19 @@ import { type empty = Record<string, never>; +export interface HttpErrors { + // timeout + [TalerErrorCode.WALLET_HTTP_REQUEST_GENERIC_TIMEOUT]: empty; + // throttled + [TalerErrorCode.WALLET_HTTP_REQUEST_THROTTLED]: empty; + // parsing + [TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE]: empty; + // network + [TalerErrorCode.WALLET_NETWORK_ERROR]: empty; + // everything else + [TalerErrorCode.GENERIC_UNEXPECTED_REQUEST_ERROR]: empty; +} + export interface DetailsMap { [TalerErrorCode.WALLET_PENDING_OPERATION_FAILED]: { innerError: TalerErrorDetail; |