Kubi Docs
Reference

Errors

Every error code, what it means and what to do.

Every error has the same body. Branch on code, retry only when retryable is true, and look before acting again when outcome is unknown.

JSONCode
{"error": {"code": "STALE_OBSERVATION", "message": "Input ran since your screenshot. Take a new screenshot first.", "request_id": "req_01jb7q0x9v2k8m4n6p3r", "retryable": false, "retry_after": null, "outcome": "not_applied", "docs_url": "https://docs.trykubi.com/errors#stale_observation", "details": {"acted_since": 2}}}

400 Bad request

CodeMeaning
INVALID_ARGUMENTA field is missing, malformed or out of range (details.field, details.problem). Fix that field and resend.
COORDINATE_OUT_OF_RANGEA point lies outside the coordinate space; it is rejected, never clamped. Use a point inside details.space.
BATCH_TOO_LONGThe batch would run past 28 s, inside the 30 s call limit. Split it into smaller batches.

401 Not signed in

CodeMeaning
UNAUTHENTICATEDThe credential is missing, malformed, unknown, revoked or expired (details.reason). Send a valid key or token.

402 Payment needed

CodeMeaning
QUOTA_EXCEEDEDThe organization is at its screen cap (details.screen_cap). Delete a screen, or a person asks support for a higher cap.
PAYMENT_REQUIREDPayment failed. A person pays at details.pay_url.
CREDIT_EXHAUSTEDThe usage credit that pays for disposable screens is used up (details.balance_usd). A person tops up at details.billing_url, or create a persistent screen.
SUBSCRIPTION_REQUIREDBuying usage credit needs a paid persistent screen first. A person subscribes at details.billing_url.

403 Not allowed

CodeMeaning
PERMISSION_DENIEDThe credential lacks details.needed, or is not bound to this screen. Use a credential that has it.
HUMAN_ONLYOnly a signed-in person (dashboard cookie) may call this. Ask a person to do it in the dashboard.
CSRF_REJECTEDA cookie request changed state without the dashboard's Origin. Send it from the dashboard, or use an API key.
ORGANIZATION_SUSPENDEDThe organization is suspended. Stop and tell the user.
ACCOUNT_PENDINGThe account is waiting for approval. Stop and tell the user.

404 Not found

CodeMeaning
SCREEN_NOT_FOUNDNo such screen in your organization (the same answer for another organization's id). List screens for a valid id.
NOT_FOUNDNo such operation, exec, key, app, export, template, snapshot or saved screenshot (saved ones go after 30 days). Check the id.
FILE_NOT_FOUNDNothing at that path on the screen. List the folder with listFiles.

409 Conflict

CodeMeaning
NO_CAPACITYNo free machine for a new screen right now; nothing was charged. Retry after retry_after.
STALE_OBSERVATIONInput ran (anyone's, a person's in the live view included) or the screen restarted since your screenshot (details.acted_since, details.restarted). Take a new screenshot first.
CONTROL_HELDA person has control of this screen, so nothing ran. Control ends when they release it, or after 5 minutes with no input from them. Wait retry_after seconds, then take a new screenshot before acting.
SCREEN_NOT_RUNNINGThe screen is stopped, starting or stopping. Start it, or wait on its operation.
OPERATION_IN_PROGRESSAnother power operation runs on this screen. Wait on it, then retry.
IDEMPOTENCY_KEY_IN_USEA request with this key is still running. Retry the same request.
UNSUPPORTED_CAPABILITYThis screen cannot do that (for example a screenless box). Use a screen that can.

413 Too large

CodeMeaning
PAYLOAD_TOO_LARGEThe body or file is over details.limit_bytes. Send less, or move big files through exec.

415 Wrong content type

CodeMeaning
UNSUPPORTED_MEDIA_TYPEWrong Content-Type. Send application/json (application/octet-stream for file uploads).

422 Cannot process

CodeMeaning
IDEMPOTENCY_KEY_REUSEDThis key was used with a different body. Use a new key.
SECRET_BLOCKEDThe input contains one of our API keys; nothing was typed or run. Remove the key and resend.
URL_NOT_ALLOWEDThe URL is not public HTTPS: it resolves to a private or reserved address, or redirects. Use a public HTTPS URL.

429 Too many requests

CodeMeaning
RATE_LIMITEDToo many requests. Wait retry_after seconds.

500 Server error

CodeMeaning
INTERNALOur bug. Retry with the same Idempotency-Key.

503 Unavailable

CodeMeaning
SCREEN_UNAVAILABLEThe screen's host or desktop is not answering. Retry after retry_after.

504 Outcome unknown

CodeMeaning
OUTCOME_UNKNOWNThe work may or may not have happened. Look before acting; never resend blindly.