X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Frepository%2FInfoTypeSubscriptions.java;h=65978e15647039fec06eadfba68c9d8136f8941c;hb=4cd9f067e6985a28c045dd672bd86581b8b5b1a9;hp=2d6da4f561414a8ecb7ba503732c1363d4c67e6c;hpb=6ab9cd9df333ab3b5ed1ce6957dcea8f20d5c28d;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java index 2d6da4f5..65978e15 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/InfoTypeSubscriptions.java @@ -47,6 +47,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpStatus; import org.springframework.util.FileSystemUtils; import reactor.core.publisher.Flux; @@ -118,7 +119,7 @@ public class InfoTypeSubscriptions { public synchronized SubscriptionInfo getSubscription(String id) throws ServiceException { SubscriptionInfo p = allSubscriptions.get(id); if (p == null) { - throw new ServiceException("Could not find Information subscription: " + id); + throw new ServiceException("Could not find Information subscription: " + id, HttpStatus.NOT_FOUND); } return p; } @@ -196,7 +197,8 @@ public class InfoTypeSubscriptions { private Mono error() { return Mono.error(new ServiceException( - "No notifyTypeRegistered handler found for interface version " + apiVersion)); + "No notifyTypeRegistered handler found for interface version " + apiVersion, + HttpStatus.INTERNAL_SERVER_ERROR)); } }; }