diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-03-12 19:25:38 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-03-12 19:25:38 +0530 |
commit | b5b8f96cc94e3a3c0ee7d989819197ab5df393cd (patch) | |
tree | 0382770a735c4f43e09bfb9d03345bc93ecc498a /src/wallet.ts | |
parent | 2ec6799c8c6836d44944460a41fabefb8eb8186f (diff) | |
download | wallet-core-b5b8f96cc94e3a3c0ee7d989819197ab5df393cd.tar.xz |
improved error reporting / towards a working recoup
Diffstat (limited to 'src/wallet.ts')
-rw-r--r-- | src/wallet.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet.ts b/src/wallet.ts index 3b619f874..9cba1360e 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -113,6 +113,7 @@ import { } from "./operations/refund"; import { durationMin, Duration } from "./util/time"; import { processRecoupGroup } from "./operations/recoup"; +import { OperationFailedAndReportedError } from "./operations/errors"; const builtinCurrencies: CurrencyRecord[] = [ { @@ -235,7 +236,11 @@ export class Wallet { try { await this.processOnePendingOperation(p, forceNow); } catch (e) { - console.error(e); + if (e instanceof OperationFailedAndReportedError) { + console.error("Operation failed:", JSON.stringify(e.operationError, undefined, 2)); + } else { + console.error(e); + } } } } |