Package org.apache.solr.jersey
Class NotFoundExceptionMapper
java.lang.Object
org.apache.solr.jersey.NotFoundExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.NotFoundException>
public class NotFoundExceptionMapper
extends Object
implements jakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.NotFoundException>
An
ExceptionMapper for the exception produced by JAX-RS when no match could be found for
an incoming request.
If no special flags are set, this mapper returns an error response similar to that produced by other V2 codepaths.
If the RequestContextKeys.SUPPRESS_ERROR_ON_NOT_FOUND_EXCEPTION flag is present, we
suppress the error response and merely set a flag indicating the lack of matching resource. This
is done in service of fielding requests whose resource might be registered in one of multiple
JAX-RS applications. See V2HttpCall's "executeCoreRequest" method for more details.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsetoResponse(jakarta.ws.rs.NotFoundException exception)
-
Field Details
-
resourceContext
@Context public jakarta.ws.rs.container.ResourceContext resourceContext
-
-
Constructor Details
-
NotFoundExceptionMapper
public NotFoundExceptionMapper()
-
-
Method Details
-
toResponse
public jakarta.ws.rs.core.Response toResponse(jakarta.ws.rs.NotFoundException exception) - Specified by:
toResponsein interfacejakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.NotFoundException>
-