Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
decebals committed Jan 12, 2018
1 parent 7dbb7f6 commit 0ba1f85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void handle(int statusCode, RouteContext routeContext) {
} else {
Error error = prepareError(statusCode, routeContext);
try {
routeContext.getResponse().contentType(engine.getContentType()).send(error);
routeContext.getResponse().contentType(contentType).send(error);
} catch (Exception e) {
log.error("Unexpected error generating '{}' as '{}'", Error.class.getName(), contentType, e);
routeContext.status(HttpConstants.StatusCode.INTERNAL_ERROR);
Expand Down Expand Up @@ -178,8 +178,8 @@ public void handle(Exception exception, RouteContext routeContext) {
ExceptionHandler exceptionHandler = getExceptionHandler(exception);
if (exceptionHandler != null) {
log.debug("Handling '{}' with '{}'", exception.getClass().getSimpleName(), exceptionHandler.getClass().getName());

exceptionHandler.handle(exception, routeContext);

return;
}

Expand Down

0 comments on commit 0ba1f85

Please sign in to comment.