From 5de486e6803fb73895b3d87ad7cf16618fe3369f Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 4 Dec 2022 07:19:00 -0500 Subject: [PATCH] *Handle both an error object and a rpc response object with conditional properties --- src/query/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/base.ts b/src/query/base.ts index ad7a67a..1a167d2 100644 --- a/src/query/base.ts +++ b/src/query/base.ts @@ -81,7 +81,7 @@ export default abstract class RpcQueryBase { await this._network.ready; await this._run(); } catch (e: any) { - this._promiseResolve?.({ error: e.message }); + this._promiseResolve?.({ error: e?.message || e?.error }); } }