diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wxBackend.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wxBackend.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts index 7c090b28b..c7408ed87 100644 --- a/packages/taler-wallet-webextension/src/wxBackend.ts +++ b/packages/taler-wallet-webextension/src/wxBackend.ts @@ -29,7 +29,9 @@ import { Logger, OpenedPromise, SetTimeoutTimerAPI, + TalerError, TalerErrorCode, + TalerErrorDetail, getErrorDetailFromException, makeErrorDetail, openPromise, @@ -224,14 +226,17 @@ async function dispatch< case "wallet": { const w = currentWallet; if (!w) { + const lastError: TalerErrorDetail = walletInit.lastError instanceof TalerError ? + walletInit.lastError.errorDetail : undefined + return { type: "error", id: req.id, operation: req.operation, error: makeErrorDetail( TalerErrorCode.WALLET_CORE_NOT_AVAILABLE, - {}, - `wallet core not available, last error: ${walletInit.lastError}`, + { lastError }, + `wallet core not available${!lastError ? "": `,last error: ${lastError.hint}`}`, ), }; } |