hotfix: fix reject error message in rpc api
This commit is contained in:
parent
5d0060194b
commit
2c71bcbbdc
|
@ -32,7 +32,10 @@ const api: APIMethods = METHODS.reduce(
|
|||
params: args,
|
||||
},
|
||||
})
|
||||
.then(data => Promise.resolve(data.body && data.body.result)),
|
||||
.then(data => Promise.resolve(data.body && data.body.result))
|
||||
.catch(payload => Promise.reject(
|
||||
new Error(payload.body?.error.message || 'Something went wrong'),
|
||||
)),
|
||||
}),
|
||||
{},
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue