netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

Error tag are not reflecting according to RFC6241.

Open vaibhav1713109 opened this issue 3 years ago • 5 comments

Hi @michalvasko i am pushing the xml with vlan out of range it didn't show expected output, i see this issue in lots of error tags.

Reflecting: ERROR type: application tag: operation-failed severity: error path: /ietf-interfaces:interfaces/interface/o-ran-interfaces:vlan-id message: Value "12000" does not satisfy the constraint "1..4094" (range, length, or pattern).

Expected: "The request or response (that would be generated) is too large for the implementation to handle.

error-tag: too-big error-type: transport, rpc, protocol, application error-severity: error error-info: none

vaibhav1713109 avatar Dec 20 '21 12:12 vaibhav1713109

The error tag too-big is documented to mean "The request or response (that would be generated) is too large for the implementation to handle". That does not sound like something to use when a custom YANG model rejects a leaf value.

Realistically speaking, this error message is as good as it goes: you have an XPath that you can point back to whoever triggered this request. There are more complex models out there where error conditions are much, much more complex.

jktjkt avatar Dec 20 '21 17:12 jktjkt

Hi @jktjkt How we configure a large request.

Can we push a large file through file-download?

vaibhav1713109 avatar Dec 21 '21 12:12 vaibhav1713109

It is not clear to me what error you're seeing, or what error you're trying to prevent.

jktjkt avatar Dec 21 '21 13:12 jktjkt

Means how i am able to get too-big error.

this i want

error-tag: too-big error-type: transport, rpc, protocol, application error-severity: error error-info: none Description: The request or response (that would be generated) is too large for the implementation to handle.

vaibhav1713109 avatar Dec 24 '21 05:12 vaibhav1713109

You can generate any custom error in the sysrepo callback (README). However, you can do so only after the data pass YANG validation. A value not matching some restriction is not too-big error, which means that the reaction to a configuration change is causing something "too big", not that the configuration value itself is too big.

michalvasko avatar Jan 03 '22 12:01 michalvasko