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 Details

    • TikaServerParseExceptionMapper

      public TikaServerParseExceptionMapper()
    • TikaServerParseExceptionMapper

      public TikaServerParseExceptionMapper(ExceptionReporting exceptionReporting)
  • Method Details

    • toResponse

      public jakarta.ws.rs.core.Response toResponse(TikaServerParseException e)
      500 unless a WebApplicationException is 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-party TikaServerResource providers that wrapped a WebApplicationException chose 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:
      toResponse in interface jakarta.ws.rs.ext.ExceptionMapper<TikaServerParseException>