aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java
index c7f6459482..ab2ce10690 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java
@@ -29,7 +29,7 @@ public abstract class ApiException extends Exception {
*
*/
private static final long serialVersionUID = 683162058616691134L;
- private int httpResponseCode;
+ private int httpResponseCode = 500;
private String messageID;
private ErrorLoggerInfo errorLoggerInfo;
@@ -49,6 +49,15 @@ public abstract class ApiException extends Exception {
super(message, cause);
}
+ public ApiException(String message, int httpResponseCode) {
+ super(message);
+ this.httpResponseCode = httpResponseCode;
+ }
+
+ public ApiException(String message) {
+ super(message);
+ }
+
public String getMessageID() {
return messageID;
}