Do not report failure on empty action output
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / RestconfDataServiceImpl.java
index 12d1e5f6d49c103910bfd201ed3d70c079780c33..b8eebc06faa17b27ef40a0ccbd2a1d6f02cfd5d5 100644 (file)
@@ -30,7 +30,6 @@ import java.util.Map.Entry;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import javax.ws.rs.Path;
-import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import org.eclipse.jdt.annotation.Nullable;
@@ -413,7 +412,7 @@ public class RestconfDataServiceImpl implements RestconfDataService {
         }
 
         if (resultData != null && resultData.isEmpty()) {
-            throw new WebApplicationException(Response.Status.NO_CONTENT);
+            return Response.status(Response.Status.NO_CONTENT).build();
         }
 
         return Response.status(200).entity(new NormalizedNodeContext(new InstanceIdentifierContext<>(yangIIdContext,