Simulating producer errors
[nonrtric.git] / enrichment-coordinator-service / src / main / java / org / oransc / enrichment / exceptions / ServiceException.java
index a14e8de..ffccf80 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;
+    @Getter
+    private final HttpStatus httpStatus;
 
     public ServiceException(String message) {
         super(message);
+        this.httpStatus = null;
     }
 
     public ServiceException(String message, Exception originalException) {
         super(message, originalException);
+        this.httpStatus = null;
+    }
+
+    public ServiceException(String message, HttpStatus httpStatus) {
+        super(message);
+        this.httpStatus = httpStatus;
     }
 }