Skip to content

Commit

Permalink
message change
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-tosca committed Jun 19, 2024
1 parent 9ea0cc4 commit 1867e30
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/java/edu/harvard/iq/dataverse/api/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -2338,12 +2338,6 @@ public Response addBannerMessage(JsonObject jsonObject) throws WrappedResponse {
BannerMessage toAdd = new BannerMessage();
try {

if(jsonObject == null){
String errorMessage = "Banner JSON object is not provided.";
logger.info(errorMessage);
return error(Status.BAD_REQUEST, errorMessage);
}

String dismissible = jsonObject.getString("dismissibleByUser");

boolean dismissibleByUser = false;
Expand Down Expand Up @@ -2374,7 +2368,7 @@ public Response addBannerMessage(JsonObject jsonObject) throws WrappedResponse {

} catch (Exception e) {
logger.warning("Unexpected Exception: " + e.getMessage());
return error(Status.BAD_REQUEST, "Add Banner Message unexpected exception: " + e.getMessage());
return error(Status.BAD_REQUEST, "Add Banner Message unexpected exception: invalid or missing JSON object.");
}

}
Expand Down

0 comments on commit 1867e30

Please sign in to comment.