diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/support/RestControllersSupport.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/support/RestControllersSupport.java index f3fc8d2d7..f4bc81df4 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/support/RestControllersSupport.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/support/RestControllersSupport.java @@ -48,7 +48,7 @@ public ResponseEntity handleDatabaseConstraintViolation(Constrain @ExceptionHandler(Exception.class) public final ResponseEntity handleAllOtherExceptions(Exception ex) { - ErrorResponse errorResponse = new ErrorResponse("400", ex.getLocalizedMessage(), ex.getCause().getLocalizedMessage()); + ErrorResponse errorResponse = new ErrorResponse("400", ex.getLocalizedMessage(), ex.getCause() == null ? null : ex.getCause().getLocalizedMessage()); return new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST); }