UNSUPPORTED_TYPE[01]

UNSUPPORTED_TYPE

The URL returned something Onto can't read as a document, like an image, video or archive.

Code · HTTP status · Retryable?
UNSUPPORTED_TYPE[415][No]

What this means

[02]

Onto reads HTML, PDF and text formats. UNSUPPORTED_TYPE means the fetch worked but the bytes are something else, such as an image, a video or an archive. Onto looks at the bytes as well as the `Content-Type` header, so a PDF served with the wrong header is still read as a PDF. Failed requests are refunded.

When you'll see it

[03]

HTTP 415. Body always includes code: "UNSUPPORTED_TYPE". Branch on code, never on the human-readable message — wording can change without notice; the code is the stable contract.

Example response

[04]
example response[json]
{
  "status": "error",
  "code": "UNSUPPORTED_TYPE",
  "message": "Not a readable document (image/png). Onto reads HTML, PDF, and text formats."
}

How to handle

[05]

Skip the URL, or send Onto the page that links to the file instead of the file itself. Retrying won't change the file type.

Suggested handling in a Node client:

if (data.code === 'UNSUPPORTED_TYPE') {
  // Not a document Onto can read. Skip it.
  return null;
}
Code · Status · What it means
TOO_LARGE[HTTP 413]

The document is over 10 MB, the most Onto will read.

IMAGE_PDF[HTTP 422]

The URL is a scanned PDF with no text layer, so there's no text to extract.

See the full error index for the complete catalog with the handling switch statement covering every code at once.