REST API Errors
The Meter API uses standard HTTP status codes and returns JSON error messages.HTTP status codes
| Code | Meaning | Description |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | Valid key but insufficient permissions |
404 | Not Found | Resource doesn’t exist |
422 | Unprocessable Entity | Request valid but semantically incorrect |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server-side error |
503 | Service Unavailable | Temporary service issue |
Error response format
All errors return JSON with adetail field:
Common errors
401 Unauthorized
Cause: Invalid or missing API key- Verify
Authorizationheader is included - Check API key is correct
- Ensure key hasn’t been deleted
400 Bad Request
Cause: Invalid request parameters- Missing required fields
- Invalid field types
- Malformed JSON
- Invalid UUIDs
- Check request body matches expected format
- Verify all required fields are present
- Ensure JSON is valid
404 Not Found
Cause: Resource doesn’t exist- Verify the UUID is correct
- Check the resource hasn’t been deleted
- Ensure you have permission to access it
422 Unprocessable Entity
Cause: Request is valid but contains semantic errors- Check field values meet semantic requirements (e.g., valid URL format)
- Verify data relationships are valid
500 Internal Server Error
Cause: Server-side error- Retry the request after a delay
- If persistent, contact support
- Check API status page
Handling errors
JavaScript
Python
curl
Best practices
Implement retry logic
Implement retry logic
For 429, 500, and 503 errors, retry with appropriate backoff:
Check status codes
Check status codes
Always check HTTP status codes before parsing responses:
Log errors with context
Log errors with context
Include request details when logging errors:
Rate limiting
Strategy generation endpoints (/api/strategies/generate, /api/watch) are rate limited to prevent overloading the underlying LLM service.
429 Too Many Requests
When you hit rate limits, the API returns:Retry-After header tells you how many seconds to wait before retrying.
Handling rate limits
JavaScript:503 Service Unavailable
If the LLM service is temporarily unavailable:Next steps
Python SDK Errors
Error handling in the Python SDK
REST API Overview
Learn about the REST API
Authentication
Understand authentication errors