The Apache Tika REST server provides for a PDF document with password status code 422 (Unprocessable Entity). If the file format is unsupported, 422 is sent as well.
Unfortunately, it is not ppssible to distinguish whether the metadata of a file could not be determined due to the encryption or the format.
When I call the file through the Tika app, I get either the message "encrypted file" or "format not valid" in the console.
Unfortunately, the result header also contains no additional information.
Example:
HTTP / 1.1 422 Unprocessable entity
Date: Fri, 11 May 2018 12:21:28 GMT
Content-Length: 0
Server: Jetty (8.y.z-SNAPSHOT)
Is there a way to get an additional description of error 422 after a REST call? Preferably via an extension of the header data.
Many Thanks, greetings Oliver