This fixes obviously wrong error message propagated to user when RPC
with an input section defined is tried to be invoked without any/empty
payload.
Change-Id: I7cb6f5b6e0b7ea6fa16907d94028502957c90166
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
}
if (!rpc.getInput().getChildNodes().isEmpty()) {
- LOG.debug("RPC {} does not need input value.", rpc);
- throw new RestconfDocumentedException("RPC " + rpc + " does not take any input value.",
- ErrorType.RPC, ErrorTag.INVALID_VALUE);
+ LOG.debug("No input specified for RPC {} with an input section", rpc);
+ throw new RestconfDocumentedException("No input specified for RPC " + rpc
+ + " with an input section defined", ErrorType.RPC, ErrorTag.MISSING_ELEMENT);
}
final ListenableFuture<DOMRpcResult> response;