Package org.apache.tika.server.core
Class BadRequestExceptionMapper
java.lang.Object
org.apache.tika.server.core.BadRequestExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.BadRequestException>
@Provider
public class BadRequestExceptionMapper
extends Object
implements jakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.BadRequestException>
Returns the exception's message in the 400 response body. CXF's default
WebApplicationExceptionMapper drops it unless addMessageToResponse
is set, so a bare throw new BadRequestException(msg) -- e.g. the "unrecognized
handler type" and reserved-fetcher/emitter errors -- would otherwise reach the client
as an empty body with the reason only in the server log.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsetoResponse(jakarta.ws.rs.BadRequestException e)
-
Constructor Details
-
BadRequestExceptionMapper
public BadRequestExceptionMapper()
-
-
Method Details
-
toResponse
public jakarta.ws.rs.core.Response toResponse(jakarta.ws.rs.BadRequestException e) - Specified by:
toResponsein interfacejakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.BadRequestException>
-