Skip to main content

Error Response Format

All errors follow a consistent format with an optional hint field that provides actionable guidance:
The requestId is unique per request — include it in support tickets for faster debugging.

Error Codes

The Hint System

Error responses include a hint field with a human-readable suggestion for how to resolve the issue. Hints are tailored to the specific error context.

Validation Errors

When the code is VALIDATION_ERROR, the details array contains field-level information:

SDK Error Handling

The SDK throws typed TicketnationError instances with all fields including hint:

Complete Error Handler Example

TicketnationError Properties

SDK-Only Error Codes

These codes are generated by the SDK itself, not the API:

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
Not retried: 4xx errors (400, 401, 403, 404, 429) — these are client errors that need to be fixed. Configure retries:

Rate Limit Headers

Every response includes rate limit information: When you hit the limit, the response is 429 with a RATE_LIMITED error. Wait until X-RateLimit-Reset before retrying.

Troubleshooting

  • Verify your API key is correct and not expired
  • Check the api-key header name (not Authorization)
  • Ensure the key has not been deleted from the dashboard
  • 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.hint for specific guidance
  • 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
  • Default timeout is 30 seconds — increase it if needed
  • Check if baseUrl is correct (no trailing slash)
  • For local development, use http://localhost:4000
  • These resources require the events:write scope
  • Create a new API key with events:write enabled if your current key does not have it