NONRTRIC - Enrichment Coordinator Service, Changed error codes
[nonrtric.git] / enrichment-coordinator-service / src / main / java / org / oransc / enrichment / exceptions / ServiceException.java
index a14e8de..bce786f 100644 (file)
 
 package org.oransc.enrichment.exceptions;
 
+import lombok.Getter;
+
+import org.springframework.http.HttpStatus;
+
 public class ServiceException extends Exception {
 
     private static final long serialVersionUID = 1L;
-
-    public ServiceException(String message) {
-        super(message);
-    }
+    @Getter
+    private final HttpStatus httpStatus;
 
     public ServiceException(String message, Exception originalException) {
         super(message, originalException);
+        this.httpStatus = null;
+    }
+
+    public ServiceException(String message, HttpStatus httpStatus) {
+        super(message);
+        this.httpStatus = httpStatus;
     }
 }