Fix stray promises when a node returns invalid results (#4118).
This commit is contained in:
parent
f37a52da28
commit
3c1bad2fb7
@ -505,7 +505,12 @@ export abstract class JsonRpcApiProvider extends AbstractProvider {
|
||||
|
||||
// No result; the node failed us in unexpected ways
|
||||
if (resp == null) {
|
||||
return reject(makeError("no response from server", "BAD_DATA", { value: result, info: { payload } }));
|
||||
const error = makeError("missing response for request", "BAD_DATA", {
|
||||
value: result, info: { payload }
|
||||
});
|
||||
this.emit("error", error);
|
||||
reject(error);
|
||||
continue;
|
||||
}
|
||||
|
||||
// The response is an error
|
||||
|
Loading…
Reference in New Issue
Block a user