@ExceptionHandler(DataTypeNotSupportedException.class)
  @ResponseBody
  @ResponseStatus(HttpStatus.NOT_ACCEPTABLE)
  public String handleException(final DataTypeNotSupportedException tns) {
    return convertErrorAsJson(tns.getMessage());
  }
Handles any DataTypeNotSupportedException thrown by a REST API web service endpoint, HTTP
request handler method.
<p>

@param tns the DataTypeNotSupportedException thrown if problem occurs in cache values to JSON
       conversion.
@return the String message from the RuntimeException.
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/BaseControllerAdvice.java