AAA-158: remove exception output in HTTP response 34/68034/1
authorRyan Goulding <ryandgoulding@gmail.com>
Wed, 7 Feb 2018 19:11:37 +0000 (14:11 -0500)
committerRyan Goulding <ryandgoulding@gmail.com>
Wed, 7 Feb 2018 19:11:37 +0000 (14:11 -0500)
Change-Id: Icb3c2cfcf1d546bb365fb61d558cd3be428e5a15
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
aaa-authn-api/src/main/java/org/opendaylight/aaa/api/model/IDMError.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/idm/UserHandler.java

index 8cd7003fafffae8356184691a65f44982187ad6b..d12425bcf3a78964d9046cf90e036abc46c80fe4 100644 (file)
@@ -37,6 +37,10 @@ public class IDMError {
         details = msgDetails;
     }
 
+    public IDMError(int statusCode, String msg) {
+        this(statusCode, msg, "");
+    }
+
     public String getMessage() {
         return message;
     }
index 1a1d376b09e30f7f16fa258059b65a69ea5fd194..2a031cd74833ead37b0a8335f8d67d074f356764 100644 (file)
@@ -331,12 +331,12 @@ public class UserHandler {
      * @param verbal
      *            such as "creating", "deleting", "updating"
      * @param ex
-     *            The exception, which is propagated in the response
+     *            The exception, which is logged locally
      * @return A response containing internal error with specific reasoning
      */
     private Response internalError(final String verbal, final Exception ex) {
         LOG.error("There was an internal error {} the user", verbal, ex);
-        return new IDMError(500, String.format("There was an internal error %s the user", verbal), ex.getMessage())
+        return new IDMError(500, String.format("There was an internal error %s the user", verbal))
                 .response();
     }