hubgeter commented on code in PR #7888: URL: https://github.com/apache/geode/pull/7888#discussion_r1901145523
########## geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/BaseControllerAdvice.java: ########## @@ -65,8 +66,10 @@ protected String getRestApiVersion() { @ExceptionHandler({RegionNotFoundException.class, ResourceNotFoundException.class}) @ResponseBody @ResponseStatus(HttpStatus.NOT_FOUND) - public String handle(final RuntimeException e) { - return convertErrorAsJson(e.getMessage()); + public ResponseEntity<String> handle(final RuntimeException e) { + return ResponseEntity.status(HttpStatus.NOT_FOUND) + .contentType(APPLICATION_JSON_UTF8) + .body(convertErrorAsJson(e.getMessage())); } Review Comment: Thank you both for your review! I’ve added two methods to implement this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org