*add typecast
This commit is contained in:
parent
e0c0ee3f83
commit
a9f5b4d2c8
|
@ -124,9 +124,8 @@ async function processRequest(request: RPCRequest): Promise<RPCResponse> {
|
||||||
|
|
||||||
rpcResp = rpcResp as unknown as JSONRPCResponseWithError;
|
rpcResp = rpcResp as unknown as JSONRPCResponseWithError;
|
||||||
|
|
||||||
if (rpcResp.error) {
|
if (rpcResp.error && typeof rpcResp.error === "object") {
|
||||||
// @ts-ignore
|
error = (rpcResp.error as JSONRPCError).message;
|
||||||
error = rpcResp.error.message;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue