Fix: Missing error event
For some error responses like the ones described in #4104 the error wasn't broadcasted to the event listeners.
This commit is contained in:
parent
ad5f1c5fc7
commit
a5f0eea16f
@ -560,7 +560,9 @@ export abstract class JsonRpcApiProvider extends AbstractProvider {
|
||||
|
||||
// The response is an error
|
||||
if ("error" in resp) {
|
||||
reject(this.getRpcError(payload, resp));
|
||||
const error = this.getRpcError(payload, resp);
|
||||
this.emit("error", error);
|
||||
reject(error);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user