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 <vdemcak@cisco.com>
(cherry picked from commit
097cf9e9d96e6ad94ab91728ab84c49b0eba5f61)
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();