@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
  @ResponseBody
  @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
  public String handleException(final HttpRequestMethodNotSupportedException e) {
    return convertErrorAsJson(e.getMessage());
  }
Handles HttpRequestMethodNotSupportedException thrown by a REST API web service when request is
received with unsupported HTTP method.
<p>

@param e the HttpRequestMethodNotSupportedException thrown when REST request is received with
       NOT support methods.
@return the String message from the RuntimeException.
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/BaseControllerAdvice.java