X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fexceptions%2FServiceException.java;h=ffccf806c3a7d40b689da616d0303354da52205f;hb=6a1eb6e2a6538decc54f5348fcb1589f5b829e68;hp=a14e8dec1a2acebf112dfd83550bb845ab6eb510;hpb=0f8b3b162b7ab08cdfc998979cfa9866634893a6;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java index a14e8dec..ffccf806 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java @@ -18,15 +18,28 @@ 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; } }