Skip to content

Commit

Permalink
DWN-39926 : amend exception name in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
hsmith-gresham committed Jan 4, 2023
1 parent b6f361b commit 0bea906
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ public String addNewWhitelistedSite(@RequestBody String jsonString, ModelMap m,
whitelist = gson.fromJson(json, WhitelistedSite.class);
validateWhitelistScopes(whitelist.getAllowedScopes());
} catch (WhitelistScopesException e) {
logger.error("addNewWhitelistedSite failed due to WhitelistException. {}", e.getMessage());
logger.error("addNewWhitelistedSite failed due to WhitelistScopesException. {}", e.getMessage());
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered a whitelist exception. Contact a system administrator for assistance.");
m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered a whitelist scopes exception. Contact a system administrator for assistance.");
return JsonErrorView.VIEWNAME;
} catch (JsonParseException e) {
logger.error("addNewWhitelistedSite failed due to JsonParseException", e);
Expand Down Expand Up @@ -147,9 +147,9 @@ public String updateWhitelistedSite(@PathVariable("id") Long id, @RequestBody St
whitelist = gson.fromJson(json, WhitelistedSite.class);
validateWhitelistScopes(whitelist.getAllowedScopes());
} catch (WhitelistScopesException e) {
logger.error("addNewWhitelistedSite failed due to WhitelistScopeException. {}", e.getMessage());
logger.error("addNewWhitelistedSite failed due to WhitelistScopesException. {}", e.getMessage());
m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST);
m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered a whitelist scope exception. Contact a system administrator for assistance.");
m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered a whitelist scopes exception. Contact a system administrator for assistance.");
return JsonErrorView.VIEWNAME;
} catch (JsonParseException e) {
logger.error("updateWhitelistedSite failed due to JsonParseException", e);
Expand Down

0 comments on commit 0bea906

Please sign in to comment.