@ExceptionHandler(AccessDeniedException.class)
  @ResponseBody
  @ResponseStatus(HttpStatus.FORBIDDEN)
  public String handleException(final AccessDeniedException cause) {
    return convertErrorAsJson(cause.getMessage());
  }
Handles an AccessDenied Exception thrown by a REST API web service endpoint, HTTP request
handler method.
<p>

@param cause the Exception causing the error.
@return a ResponseEntity with an appropriate HTTP status code (403 - Forbidden)
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/BaseControllerAdvice.java