MetaMask/eth-json-rpc-middleware

The `fetch` middleware produces an empty response when retries have been exhausted

Opened this issue · 0 comments

The fetch middleware has a series of errors that it will look for when making the request to the RPC endpoint, and if any of them appear, it will retry the request up to 5 times. If the request still fails after the retries have been exhausted, the middleware will do nothing and return an empty response. The empty response is then caught by json-rpc-engine, which produces its own error. Thus, the original error is lost. This is in opposition to the Infura middleware exposed by eth-json-rpc-middleware, which produces a "All retries exhausted" error, along with the original error.