Log full exception when we are missing errors
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / jersey / providers / errors / RestconfDocumentedExceptionMapper.java
index a4e9de5209ef5530ef8a530f33fdd0bfef4e7f6b..60aeaba84371abd1818c7afe322eeb4bf48d4753 100644 (file)
@@ -92,10 +92,9 @@ public final class RestconfDocumentedExceptionMapper implements ExceptionMapper<
         if (responseStatus != Response.Status.FORBIDDEN
                 && responseStatus.getFamily() == Response.Status.Family.CLIENT_ERROR
                 && exception.getErrors().isEmpty()) {
-            // there should be at least one error entry for 4xx errors except 409 according to the RFC 8040
-            // - creation of WARN log that something went wrong way on the server side
-            LOG.warn("Input exception has a family of 4xx but doesn't contain any descriptive errors: {}",
-                    exception.getMessage());
+            // There should be at least one error entry for 4xx errors except 409 according to RFC8040, but we do not
+            // have it. Issue a warning with the call trace so we can fix whoever was the originator.
+            LOG.warn("Input exception has a family of 4xx but does not contain any descriptive errors", exception);
         }
 
         final ContainerNode errorsContainer = buildErrorsContainer(exception);
@@ -368,4 +367,4 @@ public final class RestconfDocumentedExceptionMapper implements ExceptionMapper<
     void setHttpHeaders(final HttpHeaders httpHeaders) {
         this.headers = httpHeaders;
     }
-}
\ No newline at end of file
+}