* Changed so that 400 Bad Request are for invalid api-path or unknown yang elements, 404 Not Found for valid xml when object not found.

This commit is contained in:
Olof hagsand 2019-10-07 22:20:34 +02:00
parent 6e41592aec
commit 8cdb0bb062
13 changed files with 189 additions and 107 deletions

View file

@ -172,7 +172,6 @@ api_data_get2(clicon_handle h,
if ((ret = api_path2xpath_cvv(pcvec, pi, yspec, cbpath, &nsc, &xerr)) < 0)
goto done;
if (ret == 0){
clicon_err_reset();
if ((xe = xpath_first(xerr, "rpc-error")) == NULL){
clicon_err(OE_XML, EINVAL, "rpc-error not found (internal error)");
goto done;