diff options
author | Tomasz Wrobel <tomasz.wrobel@nokia.com> | 2020-03-18 14:35:36 +0100 |
---|---|---|
committer | Bogumil Zebek <bogumil.zebek@nokia.com> | 2020-03-23 07:32:29 +0000 |
commit | 8b74643e0738bd0266e510a422bf71cc67604f37 (patch) | |
tree | d0da489ebf5a6d45c598319bddea36254aa18d12 /certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java | |
parent | 4b65b3c32da416ebfecb7eac808d76d89ae4b2a8 (diff) |
Improve exceptions logging in certservice client
Issue-ID: AAF-1107
Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com>
Change-Id: I94a6477a7b1f086b698be4f0388e7a3ded0cd0f3
Diffstat (limited to 'certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java')
-rw-r--r-- | certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java index 7286318f..151c2a1c 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/httpclient/exception/CertServiceApiResponseException.java @@ -20,23 +20,22 @@ package org.onap.aaf.certservice.client.httpclient.exception; -import org.onap.aaf.certservice.client.api.ExitCode; +import org.onap.aaf.certservice.client.api.ExitStatus; import org.onap.aaf.certservice.client.api.ExitableException; public class CertServiceApiResponseException extends ExitableException { - private static final ExitCode EXIT_CODE = ExitCode.CERT_SERVICE_API_CONNECTION_EXCEPTION; + private static final ExitStatus EXIT_STATUS = ExitStatus.CERT_SERVICE_API_CONNECTION_EXCEPTION; - public CertServiceApiResponseException(String url, int responseCode, String messageFromAPI) { + public CertServiceApiResponseException(int responseCode, String messageFromAPI) { - super(String.format("Request failed for URL '%s'. Response code: %d . Message from API: %s", - url, + super(String.format("CertService HTTP unsuccessful response. Response code: %d . Message from Service: %s", responseCode, messageFromAPI)); } @Override - public int applicationExitCode() { - return EXIT_CODE.getValue(); + public ExitStatus applicationExitStatus() { + return EXIT_STATUS; } } |