Skip to main content
When a ParaLens request fails, the API returns a JSON body with an error field and an appropriate HTTP status code. This page documents all error conditions and how to handle them in your integration.

Error Response Shape

All error responses share a consistent envelope:

Status Codes


400 Bad Request

A 400 is returned when the request body is invalid. These errors are user-correctable — the request must be fixed before retrying. Common causes
The tx_hash value could not be parsed as a valid Ethereum transaction hash.
Resolution: Ensure the hash is exactly 66 characters — 0x followed by 64 lowercase hex characters.
The chain value provided is not currently supported by ParaLens.
Resolution: Set chain to one of the accepted identifiers: ethereum, mainnet, eth, or 1.

502 Bad Gateway

A 502 is returned when an upstream dependency fails during analysis. These errors are retryable — the request itself is valid, but a transient failure prevented a result from being produced. Common causes
  • RPC node unavailable or congested
  • Transaction trace unavailable (very old transactions, unsupported trace format)
  • Analysis engine failure during complex trace processing
Example
Resolution: Retry after a short delay. If the error persists for a specific transaction hash, the transaction may have an unsupported trace format and cannot currently be analyzed.

Client Error Handling

The snippet below demonstrates a robust fetch wrapper that distinguishes user-correctable 400 errors from retryable 502 failures:

Display Guidance

How you surface errors to users depends on your product context:
  • Developer tools — display the raw error field value directly. The messages are precise and actionable for engineers debugging an integration.
  • Consumer UIs — replace technical errors with friendly copy:
    • 400“Please enter a valid Ethereum transaction hash.”
    • 502“Analysis temporarily unavailable — please try again.”