aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-12 19:25:38 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-12 19:25:38 +0530
commitb5b8f96cc94e3a3c0ee7d989819197ab5df393cd (patch)
tree0382770a735c4f43e09bfb9d03345bc93ecc498a /src/wallet.ts
parent2ec6799c8c6836d44944460a41fabefb8eb8186f (diff)
downloadwallet-core-b5b8f96cc94e3a3c0ee7d989819197ab5df393cd.tar.xz
improved error reporting / towards a working recoup
Diffstat (limited to 'src/wallet.ts')
-rw-r--r--src/wallet.ts7
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);
+ }
}
}
}