From 097cf9e9d96e6ad94ab91728ab84c49b0eba5f61 Mon Sep 17 00:00:00 2001 From: Vaclav Demcak Date: Tue, 2 Jun 2015 15:14:48 +0200 Subject: [PATCH] Bug 2521 - Wrong return status code for non-existing mount-point Note: MountpointService returns Optional object without mountpoint, so this is the point where we would like to see error code 404. Change-Id: Id7902e5c80786275c82e279ae0433a011fa486fc Signed-off-by: Vaclav Demcak --- .../controller/sal/restconf/impl/ControllerContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java index 8b5951197d..ad2409bfcf 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java @@ -536,7 +536,7 @@ public class ControllerContext implements SchemaContextListener { if (!mountOpt.isPresent()) { LOG.debug("Instance identifier to missing mount point: {}", partialPath); throw new RestconfDocumentedException("Mount point does not exist.", ErrorType.PROTOCOL, - ErrorTag.UNKNOWN_ELEMENT); + ErrorTag.DATA_MISSING); } final DOMMountPoint mount = mountOpt.get(); -- 2.36.6