diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-05 22:17:01 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-05 22:17:01 +0100 |
commit | 8115ac660cd9d12ef69ca80fc2e4cf8eec6b1ba1 (patch) | |
tree | 1190c1e16fb620d7812b1f26b03f20ed9615e795 /src/wallet-impl/errors.ts | |
parent | f67d7f54f9d0fed97446898942e3dfee67ee2985 (diff) |
fix refunds
Diffstat (limited to 'src/wallet-impl/errors.ts')
-rw-r--r-- | src/wallet-impl/errors.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet-impl/errors.ts b/src/wallet-impl/errors.ts index 5df99b7d3..803497e66 100644 --- a/src/wallet-impl/errors.ts +++ b/src/wallet-impl/errors.ts @@ -52,8 +52,9 @@ export async function guardOperationException<T>( onOpError: (e: OperationError) => Promise<void>, ): Promise<T> { try { - return op(); + return await op(); } catch (e) { + console.log("guard: caught exception"); if (e instanceof OperationFailedAndReportedError) { throw e; } @@ -62,6 +63,7 @@ export async function guardOperationException<T>( throw new OperationFailedAndReportedError(e.message); } if (e instanceof Error) { + console.log("guard: caught Error"); await onOpError({ type: "exception", message: e.message, @@ -69,6 +71,7 @@ export async function guardOperationException<T>( }); throw new OperationFailedAndReportedError(e.message); } + console.log("guard: caught something else"); await onOpError({ type: "exception", message: "non-error exception thrown", |