Errors
The Quin Local API error envelope, HTTP status codes, error codes by area, and how the Python and JavaScript SDKs map them to exceptions.
Trang này chưa có bản tiếng Việt. Nội dung tiếng Anh được hiển thị bên dưới.
Every refused or failed request returns a JSON error envelope with an HTTP status. Codes are stable strings meant for scripts; messages are for people and may change.
{"error": {"code": "insufficient_scope", "message": "This token lacks browser:control.",
"details": {"required": ["browser:control"]}}}details is null or an object/list with extra information. Browser actions are the exception: a
failed action answers 200 with "outcome": "error" (see
Browser actions).
HTTP statuses
| Status | When |
|---|---|
| 200 / 201 | Success (201 for created resources) |
| 202 | Accepted as a job ("wait": false on open/close) |
| 400 | Invalid input recognised by Quin (invalid_request, invalid_profile_id, …) |
| 401 | Missing or invalid token |
| 403 | Token valid but not allowed (scope, account, entitlement, web origin) |
| 404 | Unknown resource |
| 409 | Conflict with the current state (busy, not running, not published…) |
| 411 | A Transfer-Encoding header was sent |
| 413 | Body larger than 1 MB |
| 421 | Foreign Host header |
| 422 | The body or query does not match the schema |
| 429 | Rate limited; honour Retry-After |
| 500 | Unexpected error (internal_error) |
| 504 | Waiting for a browser to open or close timed out |
Request and transport
| Status | Code | Meaning / what to do |
|---|---|---|
| 421 | bad_host | Call http://127.0.0.1:<port>/ or localhost:<port> |
| 403 | origin_forbidden | The request carried an Origin header or cross-site fetch metadata, or was an OPTIONS preflight. Browsers and web pages cannot use the API |
| 411 | length_required | Send Content-Length, not chunked or other transfer encodings |
| 413 | body_too_large | Keep bodies under 1 MB |
| 400 | invalid_idempotency_key | Idempotency-Key longer than 100 characters |
| 422 | invalid_request | Schema validation failed; details lists up to 10 {loc, msg} entries |
| 429 | rate_limited | Over 30 requests/s for this token (burst 60); Retry-After: 1 |
| 429 | too_many_failures | 10 failed authentications within a minute; Retry-After: 60 |
| 500 | internal_error | The message names the exception type only |
Authentication and account
| Status | Code | Meaning |
|---|---|---|
| 401 | auth_required | No Authorization: Bearer header |
| 401 | invalid_token | Unknown, malformed or wrong token |
| 401 | token_expired | Past its expiry |
| 401 | token_revoked | Revoked in Settings |
| 403 | insufficient_scope | details.required lists the missing scopes |
| 403 | sign_in_required | Nobody is signed in to Quin |
| 403 | account_mismatch | Another Quin account is signed in |
| 403 | account_not_active | Account suspended, banned, deleted or expired, or device revoked |
| 403 | local_api_disabled | Local API turned off for the account by its administrator |
| 403 | rpa_disabled | RPA Plus turned off for the account |
| 403 | local_mode_disabled | Local profiles turned off for the account (create/clone) |
Profiles, proxies and Quin Cloud
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_profile_id | Not an 8-character local id or a Cloud UUID |
| 404 | profile_not_on_this_computer | A Cloud profile without a copy here (open it first) |
| 409 | not_cloud_profile | Revisions, sync status and sync are for Quin Cloud profiles only |
| 404 | proxy_not_found | Unknown proxy id |
| 409 | writer_busy | The Cloud profile is open on another computer |
| 409 | cloud_unavailable | Quin Cloud is not available |
Other Quin errors (proxy, runtime, Trash, Quin Cloud) pass through with Quin's own code and status,
for example proxy_unavailable, runtime_incompatible or lease_lost.
Browsers
| Status | Code | Meaning |
|---|---|---|
| 404 | session_not_found | Unknown or long-ended session id |
| 409 | session_busy | Another holder controls the browser; details.controlled_by is api or rpa. Wait, or take over |
| 409 | taken_over | Your action was cancelled by a takeover or a close |
| 409 | launch_failed | The browser did not start; details.state, details.cause |
| 504 | launch_timeout | Not ready within timeout_s |
| 504 | close_timeout | Did not finish closing in time |
| 400 | invalid_window | window needs width 200–7680 and height 200–4320 |
| 404 | file_not_found | GET /files/{path}: no such file in the workspace |
Jobs and RPA
| Status | Code | Meaning |
|---|---|---|
| 404 | job_not_found, task_not_found | Unknown id |
| 400 | no_targets | The workflow uses the browser; give profiles, a group or a filter |
| 409 | not_published | Publish the workflow first |
| 409 | workflow_disabled | The workflow is disabled |
| 422 | workflow_invalid | The workflow graph has problems (details.issues) |
| 409 | not_waiting | The run is not waiting for that signal |
Runs and jobs record their own error codes, for example interrupted (Quin stopped during the run;
state RECOVERY_REQUIRED), profile_not_saved (steps finished but a Quin Cloud profile was not saved)
and lease_lost.
SDK exceptions
Both SDKs raise a QuinError subclass carrying code, message, status and details.
| Class | Raised for |
|---|---|
AuthError | 401, or no token configured |
PermissionDenied | 403 |
NotFound | 404 |
Conflict / SessionBusy | 409 / 409 session_busy |
InvalidRequest | 400, 413, 422 |
RateLimited | 429 after retries; retry_after (Python) / retryAfter (JS) in seconds |
ServerError | 5xx |
ActionError | An action with outcome: "error"; adds action, action_id / actionId, duration_ms / durationMs |
QuinTimeout | request_timeout (HTTP) or wait_timeout (a job, task or session wait) |
ApiUnavailable | api_unavailable: Quin not running, API off, or discovery file missing |
from quin_camoufox import ActionError, PermissionDenied, SessionBusy
try:
session.click("#submit")
except SessionBusy as e:
print("busy, controlled by", e.details["controlled_by"])
except ActionError as e:
print(e.action, e.code, e.message)
except PermissionDenied as e:
print("missing scopes:", (e.details or {}).get("required"))