Skip to main content

Error Reference

This page documents the error responses returned by the thig.ai API, including HTTP status codes, application-specific error codes, and troubleshooting tips.

Error Response Format

All API errors return a JSON body with a human-readable message and an optional error code:
The error field is always present. The code field is included when a specific application error code applies. Some endpoints may include additional fields such as details for validation errors.

HTTP Status Codes

Error Codes

SSE Error Events

Streaming endpoints (such as Chat and PRD generation) use Server-Sent Events (SSE) to deliver responses incrementally. When an error occurs during streaming, it is sent as an SSE event rather than an HTTP error status:
Validation errors caught before streaming begins are also delivered as SSE events with the code VALIDATION_ERROR:
Your client should listen for events where type is "error" and handle them appropriately — for example, by displaying the message to the user and closing the connection.

Rate Limits

thig.ai uses a dual rate limiting system to protect the platform and ensure fair usage:
  • Tier-based limits — Based on your subscription plan (Free, Pro, Business, Enterprise). These govern monthly AI token usage, project counts, and other resource quotas. See Billing for plan details.
  • Endpoint-based limits — Anti-abuse limits applied per endpoint and per IP address. These prevent excessive request volumes regardless of plan tier.
When you exceed a rate limit, the API returns a 429 status with the RATE_LIMITED error code.
Check the Retry-After header in 429 responses. It indicates how many seconds to wait before retrying. Implement exponential backoff in your integration to handle rate limits gracefully.

Troubleshooting Tips

Common issues and how to resolve them:
  • “401 Unauthorized” on every request — Your session has likely expired. Log out and log back in, or generate a fresh API key from Settings > API Keys.
  • “403 Feature disabled” — The feature you are trying to use is not enabled for your current plan. Check your plan limits and upgrade if needed.
  • “429 Rate limited” — You are sending too many requests. Implement exponential backoff and respect the Retry-After header. Consider batching requests where possible.
  • “500 on AI endpoints” — The AI provider may be experiencing issues. Try switching to a different provider in your project settings or BYOK configuration.
  • “Empty response from AI” — The conversation or PRD content may be too short for the AI to analyze meaningfully. Add more context to your conversation before generating.
  • “Export fails” — Ensure the project has a generated PRD before attempting to export. If exporting to Notion or Google Docs, verify that the integration is connected.
  • “404 on a resource you just created” — The resource may belong to a different organization context. Verify you are authenticated as a member of the correct organization.
  • “409 Conflict on version creation” — A PRD version with that number already exists. The system auto-increments version numbers, but manual creation may cause conflicts. Use the next available version number.
  • “403 Approval required” — An approval workflow is configured for this action. Your request has been submitted for review. Wait for designated approvers to approve it.
  • “403 IP blocked” — Your IP is not in the organization’s allowlist. Contact your admin to add your IP or CIDR range.
  • “401 API key expired” — Your REST API key has passed its expiration date. Create a new key or extend the expiration from Settings > Developer.