Skip to content

fix(rpc): return InvalidParams instead of panic in simulateTransaction#528

Open
bonlime wants to merge 1 commit intotxtx:mainfrom
bonlime:codex/rpc-invalid-params-origin-main
Open

fix(rpc): return InvalidParams instead of panic in simulateTransaction#528
bonlime wants to merge 1 commit intotxtx:mainfrom
bonlime:codex/rpc-invalid-params-origin-main

Conversation

@bonlime
Copy link
Contributor

@bonlime bonlime commented Feb 12, 2026

Another PR with a small fix

Summary

This PR fixes a panic path in simulateTransaction when the input transaction payload is invalid (for example, oversized base64).
Instead of panicking, the RPC now returns a proper JSON-RPC InvalidParams error.

What changed

  • Replaced panic-prone unwrap handling in the transaction decode path with explicit error returns.
  • Added a regression test for oversized base64 input to ensure InvalidParams is returned.

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