diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VnfPackageRepositoryImpl.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VnfPackageRepositoryImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VnfPackageRepositoryImpl.java index be14c45dc4..6f76bf4527 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VnfPackageRepositoryImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VnfPackageRepositoryImpl.java @@ -197,9 +197,15 @@ public class VnfPackageRepositoryImpl implements VnfPackageRepository { } private static Response handleUnexpectedStatus(String action, String uri, Response response) { + ErrorCode error = new GeneralErrorBuilder().build(); - LOGGER.error("Unexpected response status while {}: URI={}, Response={}", action, uri, response, - new CoreException(error)); + + if (LOGGER.isErrorEnabled()) { + String body = response.hasEntity() ? response.readEntity(String.class) : ""; + LOGGER.error("Unexpected response status while {}: URI={}, status={}, body={}", action, uri, + response.getStatus(), body, new CoreException(error)); + } + return generateInternalServerError(error); } |