Skip to content

Rpc error handling#4171

Open
RazorClient wants to merge 9 commits into
status-im:masterfrom
RazorClient:rpc_error_handling
Open

Rpc error handling#4171
RazorClient wants to merge 9 commits into
status-im:masterfrom
RazorClient:rpc_error_handling

Conversation

@RazorClient
Copy link
Copy Markdown
Contributor

This pr introduces the Result[Opt[T], string] semantics to the rpc layer that allows us to handle the case where we need to differentiate between

  • err(...)
  • ok(none(...))
  • ok(some(...))
    also adds the tail semantics from the pruner to "earliest" tag resolution

address reviews

@RazorClient RazorClient marked this pull request as draft April 23, 2026 19:26
@RazorClient RazorClient force-pushed the rpc_error_handling branch 3 times, most recently from f028035 to 5325cba Compare April 23, 2026 19:35
@RazorClient RazorClient marked this pull request as ready for review May 5, 2026 11:23
@RazorClient
Copy link
Copy Markdown
Contributor Author

This PR cleans up the RPC error handling semantics by introducing Result[Opt[T], string]-style handling into the RPC layer, allowing us to properly differentiate between:

  • err(...) → invalid params / actual RPC errors
  • ok(none(T)) → valid “not found” case returning null
  • ok(some(T)) → successful response

The debug level failures are now removed from this pr as it doesn't fit in with the new ethjson
To be introduced with the follow-up ethjson pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant