Guides
Errors
How the API signals failures, and how to handle them.
QuickTane uses conventional HTTP status codes. 2xx means success, 4xx
means a problem with your request, and 5xx means something went wrong on our side.
Error responses are JSON with a human-readable message.
json
{ "message": "Invalid or revoked API key." }Note the difference between request errors and execution results. A run whose code throws still returns 200 — the failure is in the run object (status: "failed", non-zero exit_code), not in the HTTP status.
Status codes
| Code | Meaning |
|---|---|
200 | Success. |
202 | Accepted — the run or session was queued/launched. |
401 | Missing, invalid, or revoked API key. |
402 | Team credit exhausted — add a plan to continue. |
403 | Account suspended, or the resource isn't yours. |
404 | The run or session doesn't exist (or belongs to another team). |
409 | Session isn't ready yet for exec/file calls. |
422 | Validation failed — check the message and your parameters. |
429 | Rate limit exceeded — back off and retry. |
5xx | Server error — safe to retry with backoff. |
SDK errors
Both SDKs raise typed errors so you can branch on the failure. Every error carries the HTTP
status_code and response body.
| Error | Status |
|---|---|
AuthenticationError | 401 / 403 |
NotFoundError | 404 |
ValidationError | 422 |
RateLimitError | 429 |
APIError | anything else |
python
from quicktane import QuickTane, RateLimitError, QuickTaneError
qt = QuickTane()
try:
run = qt.run_and_wait("print(1)", language="python")
except RateLimitError:
... # back off and retry
except QuickTaneError as e:
print(e.status_code, e.body)Retrying
429and5xxare safe to retry — use exponential backoff.4xx(except429) won't succeed on retry — fix the request first.