use of jakarta.ws.rs.core.Request in project resteasy by resteasy.
the class SynchronousDispatcher method invokePropagateNotFound.
/**
* Propagate NotFoundException. This is used for Filters.
*
* @param request http request
* @param response http response
*/
public void invokePropagateNotFound(HttpRequest request, HttpResponse response) throws NotFoundException {
try {
pushContextObjects(request, response);
preprocess(request, response, () -> {
ResourceInvoker invoker = null;
try {
try {
invoker = getInvoker(request);
} catch (Exception failure) {
if (failure instanceof NotFoundException) {
throw ((NotFoundException) failure);
} else {
// logger.error("getInvoker() failed mapping exception", failure);
writeException(request, response, failure, t -> {
});
return;
}
}
invoke(request, response, invoker);
} finally {
// we're probably clearing it twice but still required
clearContextData();
}
});
} finally {
clearContextData();
}
}
Aggregations