diff options
author | Florian Dold <florian@dold.me> | 2020-11-03 16:46:43 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-11-03 16:46:43 +0100 |
commit | 0d37ec5e91f6704261070e01bb77d7c46f85b7a2 (patch) | |
tree | 7ab9e9679e71a8c8bedd2f8f616295fbfc144401 /packages/taler-wallet-core/src/operations/errors.ts | |
parent | ce326361b4ab87167656b6250fb53a99da70f5e5 (diff) | |
download | wallet-core-0d37ec5e91f6704261070e01bb77d7c46f85b7a2.tar.gz wallet-core-0d37ec5e91f6704261070e01bb77d7c46f85b7a2.tar.bz2 wallet-core-0d37ec5e91f6704261070e01bb77d7c46f85b7a2.zip |
complain about merchant base URL mismatch, fixing #6616
Diffstat (limited to 'packages/taler-wallet-core/src/operations/errors.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/errors.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/errors.ts b/packages/taler-wallet-core/src/operations/errors.ts index de78203e4..4eeda898b 100644 --- a/packages/taler-wallet-core/src/operations/errors.ts +++ b/packages/taler-wallet-core/src/operations/errors.ts @@ -31,6 +31,14 @@ import { TalerErrorCode } from "../TalerErrorCode"; * but the error has already been reported by writing it to the database. */ export class OperationFailedAndReportedError extends Error { + static fromCode( + ec: TalerErrorCode, + message: string, + details: Record<string, unknown>, + ): OperationFailedAndReportedError { + return new OperationFailedAndReportedError(makeErrorDetails(ec, message, details)); + } + constructor(public operationError: TalerErrorDetails) { super(operationError.message); |