Skip to content

input.file_unreadable

An input file cannot be read

Type https://mthds.ai/errors/input.file_unreadable
Family input: A run's inputs.
Domain input: the caller acts, by changing the request or its inputs
Retry no: repeating the operation fails the same way
HTTP status 422
Raised as a problem document, sent as the body of an HTTP response or kept in a run's record

What it means

A file given as an input does not decode, parse or open, such as a corrupt PDF or an image whose bytes are not of the format it claims.

What to do

Open the file locally to check that it is intact and of the format it claims, then send a sound copy.

Next steps

A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the caller, and the second for any other reader.

Reader Kind Detail
The domain's actor change_input Give a readable file as the input '{input}', then send the request again.
Any other reader change_input Pass this to the caller, who must give a readable file as the input '{input}'.

Detail

The problem's detail is written from this template, filled with the occurrence's parameters:

The file of the input '{input}' cannot be read as '{file_type}' (reason: {reason}).

Parameters

Every parameter is present on every occurrence of the code.

Name Type Description
input identifier The input at fault.
file_type identifier The kind of file the input was read as, such as a PDF or an image.
reason identifier Why it could not be read.

See also