MINOR: Stop logging 404s at ERROR level in Connect
Catches valid 404 exceptions, triggered by any HTTP request to a nonexistent path on the Connect REST API, higher in the code to not to log an ERROR log which can be seen as a false alarm
Reviewers: Chris Egerton
@@ -45,7 +45,7 @@ public class ConnectExceptionMapper implements ExceptionMapper<Exception> {
.build();
}
- if (exception instanceof NotFoundException) {
+ if (exception instanceof NotFoundException || exception instanceof javax.ws.rs.NotFoundException) {
return Response.status(Response.Status.NOT_FOUND)
.entity(new ErrorMessage(Response.Status.NOT_FOUND.getStatusCode(), exception.getMessage()))
.build();
