ots_getTransactionError
JSON-RPC method retrieves the raw revert reason for failed transactions on the Hyperliquid EVM blockchain. This Otterscan-specific method provides detailed error messages from smart contract failures, helping developers debug transaction issues.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
- transaction hash (string, required): The hash of the failed transaction to analyze
Response
The method returns the raw error data from the failed transaction, or null if the transaction succeeded or error data is unavailable.Response structure
result
— hex-encoded error message from the revert reason, ornull
if not available
Usage example
Shell
Example response (with error)
Example response (no error)
Decoding error messages
The returned hex data typically contains an ABI-encoded error message. Common patterns:0x08c379a0...
— Standard revert with string message- Custom error selectors — Contract-specific error codes
Use cases
Theots_getTransactionError
method is essential for:
- Smart contract debugging: Understand why transactions failed
- User experience: Display meaningful error messages to users
- Testing automation: Validate expected failure conditions
- Error monitoring: Track and categorize contract failures
- Support tools: Help users understand transaction failures
- Development workflow: Debug contract interactions during development
- Audit trails: Document failure reasons for compliance
- Gas optimization: Identify operations that consistently fail
- Integration testing: Verify error handling in dApps
- Customer support: Quickly diagnose user transaction issues
Body
application/json