Improved netconf error handling for data-not-unique and missing-choice

* Follows RFC7950 Sec 15.1 and 15.6 more closely
* Fixed: [When multiple lists have same key name, need more elaborate error message in case of configuration having duplicate keys](https://github.com/clicon/clixon/issues/362)
This commit is contained in:
Olof hagsand 2022-09-19 14:33:44 +02:00
parent e579d959fa
commit 51d1a2d41c
11 changed files with 143 additions and 65 deletions

View file

@ -818,7 +818,7 @@ check_mandatory(cxobj *xt,
if (x == NULL){
/* @see RFC7950: 15.6 Error Message for Data That Violates
* a Mandatory "choice" Statement */
if (xret && netconf_data_missing_xml(xret, yang_argument_get(yc), NULL) < 0)
if (xret && netconf_missing_choice_xml(xret, xt, yang_argument_get(yc), NULL) < 0)
goto done;
goto fail;
}