Error codes
Request errors
Section titled “Request errors”These come back as HTTP errors, as described in Errors.
| HTTP | code |
Meaning |
|---|---|---|
| 400 | parameter_missing |
A required parameter is missing. param names it. |
| 400 | parameter_invalid |
A parameter has the wrong type or an invalid value. |
| 400 | parameter_unknown |
The request has a field this endpoint doesn’t accept. |
| 400 | invalid_json |
The body isn’t valid JSON. |
| 400 | idempotency_key_missing |
This request needs an Idempotency-Key header. |
| 401 | api_key_missing |
No key was sent. |
| 401 | api_key_invalid |
The key isn’t recognised. |
| 401 | api_key_revoked |
The key has been revoked. |
| 402 | insufficient_credits |
Your available balance can’t cover one page at your rate. |
| 402 | credits_expired |
The validity period of your credits has ended. They are kept as expired in your balance: contact us to renew them. |
| 403 | insufficient_scope |
A restricted key lacks the scope this endpoint needs. |
| 403 | ip_not_allowed |
The request came from an IP address not on the key’s allowlist. |
| 403 | account_suspended |
Your account is suspended. Contact us. |
| 404 | resource_missing |
No such object in this mode. |
| 404 | route_not_found |
No such endpoint. |
| 409 | idempotency_key_reused |
The key was already used with a different request. |
| 409 | idempotency_request_in_progress |
A request with this key is still running. Retry shortly. |
| 409 | external_id_taken |
Another paper already has this external_id. resource_id is that paper. |
| 409 | paper_not_ready |
The paper isn’t ready, so it can’t take submissions. |
| 409 | paper_not_awaiting_review |
A processing or failed paper can’t be approved. |
| 409 | paper_has_empty_question |
A question has nothing to mark. Fill it in or remove it in the review workspace, then approve again. |
| 409 | paper_in_progress |
The paper is processing, or has submissions that are queued or processing. Wait for them to finish before deleting it. |
| 409 | review_link_unavailable |
Review links exist only for papers that are awaiting_review or ready. |
| 409 | file_already_attached |
The file is in use by another paper or submission. |
| 409 | file_purpose_mismatch |
The file was created for a different purpose. |
| 409 | file_not_uploaded |
No bytes have been uploaded for this file yet. |
| 409 | file_expired |
The file was deleted because it wasn’t used in time. Upload it again. |
| 409 | submission_exists |
The student already has an active submission for this paper. resource_id is that submission. |
| 409 | submission_not_cancelable |
Only a queued submission can be cancelled. |
| 409 | submission_not_releasable |
Only a graded submission can be released. |
| 409 | submission_in_progress |
The submission is queued or processing. Cancel it or wait before deleting it. |
| 409 | result_not_available |
The submission isn’t graded or released yet, so it has no result. |
| 409 | report_not_available |
The report exists only once the submission is released. |
| 409 | too_many_webhook_endpoints |
You already have 5 webhook endpoints in this mode. Delete one first. |
| 413 | request_too_large |
The request body is over 1 MB. |
| 415 | unsupported_media_type |
The request body isn’t application/json in UTF-8, or it’s compressed (Content-Encoding). |
| 429 | rate_limit_exceeded |
Too many requests. Wait for Retry-After. |
| 500 | internal_error |
Something went wrong on our side. Retry with backoff. |
| 503 | service_unavailable |
We’re temporarily overloaded or under maintenance. Wait for Retry-After. |
Processing failures
Section titled “Processing failures”These are not HTTP errors. They appear as the failure.code of a paper or submission whose status is failed. None of them is charged. To try again, fix the cause and create a new object with a new idempotency key.
| Applies to | failure.code |
Meaning |
|---|---|---|
| Paper, submission | file_download_failed |
We couldn’t download a link you gave. Check that it’s public, valid and fast. |
| Paper, submission | file_unreadable |
A document is damaged or password-protected. |
| Paper, submission | unsupported_file_type |
A document’s contents aren’t an accepted format, whatever its name or declared type. |
| Paper, submission | file_too_large |
A document is over the size limit, even after our compression. |
| Paper, submission | too_many_pages |
A document, or the script as a whole, is over the page limit. |
| Paper, submission | image_too_small |
An image is under 200 pixels on a side. |
| Paper, submission | insufficient_credits |
Your balance couldn’t cover the full cost once pages were counted. Top up first. |
| Paper, submission | credits_expired |
Your credits expired before the work started. Contact us to renew them, then create it again. |
| Paper, submission | processing_timeout |
Our work didn’t finish within 24 hours. |
| Paper | no_questions_found |
We found no questions we can mark in the question paper. |
| Paper | processing_failed |
We couldn’t read the paper, even after our automatic retries. Contact us if it fails again. |
| Submission | invalid_file_combination |
A script must be one PDF, or images only. |
| Submission | grading_failed |
We couldn’t mark every question, even after our automatic retries. Contact us if it fails again. |