Description
In the following scenarios of .pdf conversions, the /convert endpoint does not specify to the requesting client the cause of the conversion error, it simply just bounces back a 500.
- password-protected file,
- the pdf. contains only a single image.
(The file is still valid as a .pdf, but the image content can not be converted to text),
- the file is damaged. It cannot even be opened.
Current behavior
The /convert endpoint responds 500 Internal Server Error.
{
response_body=> {
status: 500,
description: Conversion error: Heathen::ConversionFailed in step 'pdftotext'
}
}
Expected behavior
The /convert endpoint responds 422 Unprocessable Content.
(and the response body might also contain information about the cause of the inability to convert. At least, for the above 3 cases where we exactly know what is wrong with the files.)
Description
In the following scenarios of .pdf conversions, the
/convertendpoint does not specify to the requesting client the cause of the conversion error, it simply just bounces back a 500.(The file is still valid as a .pdf, but the image content can not be converted to text),
Current behavior
The
/convertendpoint responds 500 Internal Server Error.Expected behavior
The
/convertendpoint responds 422 Unprocessable Content.(and the response body might also contain information about the cause of the inability to convert. At least, for the above 3 cases where we exactly know what is wrong with the files.)