Error Handling (old)

Handle errors gracefully when using Synth API.

HTTP Status Codes

Code
Meaning
Action

200

Success

Process response

400

Bad Request

Check authentication header

401

Unauthorized

Check API key

404

Not Found

Check parameters or data availability

429

Rate Limited

Retry after delay

500

Server Error

Retry later

Error Response Format

Errors return JSON with a message field:

{"message": "Unauthorized"}
{"message": "missing key in request header"}

Some endpoints return a plain string for data errors:

"No prediction available"

Common Errors

chevron-rightMissing Authorization Header — Status: 400hashtag
{"message": "missing key in request header"}
circle-info

Solution: Add the Authorization: Apikey YOUR_API_KEY header.

chevron-rightInvalid API Key — Status: 401hashtag
circle-info

Solution: Verify your API key in the dashboard.

chevron-rightNo Data Available — Status: 404hashtag
circle-info

Solution: Check that:

  • Asset is valid (BTC, ETH, SOL, XAU, SPYX, NVDAX)

  • Required parameters are provided

  • For /v2/prediction/latest: miner UIDs are valid

Best Practices

Last updated