Skip to content

feat: propagate nim-json-rpc exceptions as EthersNetworkError #117

Description

@emizzle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions