Currently, nim-ethers converts all nim-json-rpc exceptions into JsonRpcProviderError. This should be modified to convert them into an ethers-specific exception type, eg EthersNetworkError. The other option is to bubble up the errors as is but this will create a double-handling situation, where those specific errors need to be treated differently at both the ethers level and the codex level.
Network-related errors to handle (with their corresponding nim-json-rpc error types):
- connection timed out (
RpcPostError)
- connection closed during response (
FailedHttpResponse)
- HTTP 429 "too many requests" (
ErrorResponse(status=429))
See logos-storage/logos-storage-nim#1230 for more info.
Currently,
nim-ethersconverts allnim-json-rpcexceptions intoJsonRpcProviderError. This should be modified to convert them into an ethers-specific exception type, egEthersNetworkError. The other option is to bubble up the errors as is but this will create a double-handling situation, where those specific errors need to be treated differently at both the ethers level and the codex level.Network-related errors to handle (with their corresponding
nim-json-rpcerror types):RpcPostError)FailedHttpResponse)ErrorResponse(status=429))See logos-storage/logos-storage-nim#1230 for more info.