diff options
author | 2018-08-05 18:06:55 +0300 | |
---|---|---|
committer | 2018-08-06 10:26:55 +0000 | |
commit | aa8057fa429db6852a86ad217a641bb2bf12123c (patch) | |
tree | 8beaab8678f4a20cbfc91bad025ae39f07de62c8 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp | |
parent | 04ff1b844c58f9f53558ff70594bf52ef6fba6ae (diff) |
Resolved slf4j binding conflict in tests
Removed an slf4j binding, moved dependencies up to the
dependencyManagement of root POM, improved logging.
Change-Id: I21eb5160adac7d520363a524e679962be4754d11
Issue-ID: SDC-1278
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp')
-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); } |