diff --git a/openid-connect-server/src/main/java/org/mitre/oauth2/web/ScopeAPI.java b/openid-connect-server/src/main/java/org/mitre/oauth2/web/ScopeAPI.java index 28fc3eb39..250a22c86 100644 --- a/openid-connect-server/src/main/java/org/mitre/oauth2/web/ScopeAPI.java +++ b/openid-connect-server/src/main/java/org/mitre/oauth2/web/ScopeAPI.java @@ -109,7 +109,7 @@ public class ScopeAPI { try { validateScope(scope); } catch (ScopeException e) { - logger.error("updateScope failed due to ScopeException. {}", e.getMessage()); + logger.error("updateScope failed due to ScopeException", e); m.put(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); m.put(JsonErrorView.ERROR_MESSAGE, "Could not update scope. The server encountered a scope exception. Contact a system administrator for assistance."); return JsonErrorView.VIEWNAME; @@ -153,7 +153,7 @@ public class ScopeAPI { try { validateScope(scope); } catch (ScopeException e) { - logger.error("createScope failed due to ScopeException. {}", e.getMessage()); + logger.error("createScope failed due to ScopeException", e); m.put(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); m.put(JsonErrorView.ERROR_MESSAGE, "Could not create scope. The server encountered a scope exception. Contact a system administrator for assistance."); return JsonErrorView.VIEWNAME; diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/WhitelistAPI.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/WhitelistAPI.java index 35e7c77eb..db74ba53b 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/WhitelistAPI.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/WhitelistAPI.java @@ -107,7 +107,7 @@ public class WhitelistAPI { whitelist = gson.fromJson(json, WhitelistedSite.class); validateWhitelistScopes(whitelist.getAllowedScopes()); } catch (ScopeException e) { - logger.error("addNewWhitelistedSite failed due to ScopeException. {}", e.getMessage()); + logger.error("addNewWhitelistedSite failed due to ScopeException", e); m.addAttribute(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); m.addAttribute(JsonErrorView.ERROR_MESSAGE, "Could not save new whitelisted site. The server encountered a scopes exception. Contact a system administrator for assistance."); return JsonErrorView.VIEWNAME; @@ -149,7 +149,7 @@ public class WhitelistAPI { whitelist = gson.fromJson(json, WhitelistedSite.class); validateWhitelistScopes(whitelist.getAllowedScopes()); } catch (ScopeException e) { - logger.error("updateWhitelistedSite failed due to ScopeException. {}", e.getMessage()); + logger.error("updateWhitelistedSite failed due to ScopeException", e); m.put(HttpCodeView.CODE, HttpStatus.BAD_REQUEST); m.put(JsonErrorView.ERROR_MESSAGE, "Could not update whitelisted site. The server encountered a scope exception. Contact a system administrator for assistance."); return JsonErrorView.VIEWNAME;