Package org.apache.tika.server.core
Class TikaServerParseExceptionMapper
java.lang.Object
org.apache.tika.server.core.TikaServerParseExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<TikaServerParseException>
@Provider
public class TikaServerParseExceptionMapper
extends Object
implements jakarta.ws.rs.ext.ExceptionMapper<TikaServerParseException>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response500 unless aWebApplicationExceptionis in the cause chain: in 4.x a parse failure comes back as container-exception metadata from the fork, so what reaches here is a fetch/spool/IPC failure, never a document's own exception.
-
Constructor Details
-
TikaServerParseExceptionMapper
public TikaServerParseExceptionMapper() -
TikaServerParseExceptionMapper
-
-
Method Details
-
toResponse
500 unless aWebApplicationExceptionis in the cause chain: in 4.x a parse failure comes back as container-exception metadata from the fork, so what reaches here is a fetch/spool/IPC failure, never a document's own exception. Third-partyTikaServerResourceproviders that wrapped aWebApplicationExceptionchose their own response (status, headers); that passes through untouched. The cause is formatted rather than the wrapper so the body does not open with this server's own frames.- Specified by:
toResponsein interfacejakarta.ws.rs.ext.ExceptionMapper<TikaServerParseException>
-