tds/src/main/java/thredds/server/ncss/controller/AbstractNcssController.java
@ExceptionHandler(NcssException.class)
  public ResponseEntity<String> handle(NcssException e) {
    HttpHeaders responseHeaders = new HttpHeaders();
    responseHeaders.setContentType(MediaType.TEXT_PLAIN);

    return new ResponseEntity<>(e.getMessage(), responseHeaders, HttpStatus.BAD_REQUEST);
  }
@ExceptionHandler(NcssException.class)
  public ResponseEntity<String> handle(NcssException e) {
    HttpHeaders responseHeaders = new HttpHeaders();
    responseHeaders.setContentType(MediaType.TEXT_PLAIN);

    return new ResponseEntity<>(e.getMessage(), responseHeaders, HttpStatus.BAD_REQUEST);
  }
@ ExceptionHandler ( NcssException . class ) public ResponseEntity < String > handle ( NcssException e ) { HttpHeaders responseHeaders = new HttpHeaders ( ) ; responseHeaders . setContentType ( MediaType . TEXT_PLAIN ) ; return new ResponseEntity <> ( e . getMessage ( ) , responseHeaders , HttpStatus . BAD_REQUEST ) ; }
Exception handlers
Exception handlers