Error Response Format
All errors follow a consistent format with an optionalhint field that provides actionable guidance:
requestId is unique per request — include it in support tickets for faster debugging.
Error Codes
| Code | HTTP Status | Description | Common Cause |
|---|---|---|---|
VALIDATION_ERROR | 400 | Input failed validation | Missing required fields, invalid format |
UNAUTHORIZED | 401 | Authentication failed | Missing/invalid/expired API key |
FORBIDDEN | 403 | Not allowed | Missing scope, IP not in allowlist |
SCOPE_REQUIRED | 403 | Specific scope needed | Key lacks the required scope |
NOT_FOUND | 404 | Resource not found | Wrong ID, or resource belongs to another org |
RATE_LIMITED | 429 | Too many requests | Exceeded rate limit for your tier |
INTERNAL_ERROR | 500 | Server error | Transient failure — retry with backoff |
The Hint System
Error responses include ahint field with a human-readable suggestion for how to resolve the issue. Hints are tailored to the specific error context.
VALIDATION_ERROR hints
VALIDATION_ERROR hints
SCOPE_REQUIRED hints
SCOPE_REQUIRED hints
NOT_FOUND hints
NOT_FOUND hints
RATE_LIMITED hints
RATE_LIMITED hints
Validation Errors
When the code isVALIDATION_ERROR, the details array contains field-level information:
SDK Error Handling
The SDK throws typedTicketnationError instances with all fields including hint:
Complete Error Handler Example
TicketnationError Properties
| Property | Type | Description |
|---|---|---|
code | string | Error code (e.g., VALIDATION_ERROR, NOT_FOUND) |
status | number | HTTP status code (0 for client-side errors like TIMEOUT) |
message | string | Human-readable error message |
requestId | string | Unique request identifier for support |
details | array | Field-level errors (for VALIDATION_ERROR) |
hint | string | Actionable suggestion for resolving the error |
SDK-Only Error Codes
These codes are generated by the SDK itself, not the API:| Code | Status | Description | Fix |
|---|---|---|---|
TIMEOUT | 0 | Request exceeded the configured timeout | Increase timeout in config, or check network |
NETWORK_ERROR | 0 | DNS/connection failure | Verify baseUrl is reachable |
HTTP_ERROR | varies | Server returned error with no parseable body | Transient — retry |
Automatic Retries
The SDK automatically retries on 5xx server errors with exponential backoff:- Attempt 1: immediate
- Attempt 2: after 1 second
- Attempt 3: after 2 seconds
Rate Limit Headers
Every response includes rate limit information:| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests for your tier |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
429 with a RATE_LIMITED error. Wait until X-RateLimit-Reset before retrying.
Troubleshooting
UNAUTHORIZED on every request
UNAUTHORIZED on every request
SCOPE_REQUIRED when calling an endpoint
SCOPE_REQUIRED when calling an endpoint
- Check which scope the endpoint needs (see API Reference)
- Performers, schedules, and brands require
events:write - Update your API key’s scopes in the dashboard, or create a new key with the required scopes
- Check the
error.hintfor specific guidance
NOT_FOUND for a resource you created
NOT_FOUND for a resource you created
- Events/tickets are scoped to your organization — you can only access resources owned by the org associated with your API key
- Double-check the UUID format
- Use
tn.events.list()to list your events and verify the ID
Requests timing out
Requests timing out
- Default timeout is 30 seconds — increase it if needed
- Check if
baseUrlis correct (no trailing slash) - For local development, use
http://localhost:4000
Performers, schedules, or brands returning 403
Performers, schedules, or brands returning 403
- These resources require the
events:writescope - Create a new API key with
events:writeenabled if your current key does not have it

