Merge "Adding Schema reference in the API definition instead of declaring Object...
[ccsdk/oran.git] / a1-policy-management / src / main / java / org / onap / ccsdk / oran / a1policymanagementservice / repository / Services.java
index d8a902e..c2f4f87 100644 (file)
@@ -34,6 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import org.springframework.http.HttpStatus;
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
@@ -51,7 +52,7 @@ public class Services {
     public synchronized Service getService(String name) throws ServiceException {
         Service service = registeredServices.get(name);
         if (service == null) {
-            throw new ServiceException("Could not find service: " + name);
+            throw new ServiceException("Could not find service: " + name, HttpStatus.NOT_FOUND);
         }
         return service;
     }