diff options
Diffstat (limited to 'packages/taler-util/src/errors.ts')
-rw-r--r-- | packages/taler-util/src/errors.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-util/src/errors.ts b/packages/taler-util/src/errors.ts index 11f01a3fe..4dea7e1b6 100644 --- a/packages/taler-util/src/errors.ts +++ b/packages/taler-util/src/errors.ts @@ -25,6 +25,7 @@ */ import { AbsoluteTime, + CancellationToken, PaymentInsufficientBalanceDetails, TalerErrorCode, TalerErrorDetail, @@ -285,6 +286,13 @@ export function getErrorDetailFromException(e: any): TalerErrorDetail { if (e instanceof TalerError) { return e.errorDetail; } + if (e instanceof CancellationToken.CancellationError) { + const err = makeErrorDetail( + TalerErrorCode.WALLET_CORE_REQUEST_CANCELLED, + {}, + ); + return err; + } if (e instanceof Error) { const err = makeErrorDetail( TalerErrorCode.WALLET_UNEXPECTED_EXCEPTION, |