*add typecast

This commit is contained in:
Derrick Hammer 2022-07-22 20:57:53 -04:00
parent e0c0ee3f83
commit a9f5b4d2c8
1 changed files with 2 additions and 3 deletions

View File

@ -124,9 +124,8 @@ async function processRequest(request: RPCRequest): Promise<RPCResponse> {
rpcResp = rpcResp as unknown as JSONRPCResponseWithError;
if (rpcResp.error) {
// @ts-ignore
error = rpcResp.error.message;
if (rpcResp.error && typeof rpcResp.error === "object") {
error = (rpcResp.error as JSONRPCError).message;
}
}