Customising leafref error msg

Hello Team,

Is it possible to customize the error msg thrown by leafref?
Instead of “Error: illegal reference”, can we override this with a custom error msg?


You can register error formatting callback (via confd_register_error_cb()).

Go through the struct confd_errinfo fields for all possible error type information.

Leafref errors are classified as type CONFD_ERRTYPE_VALIDATION and subcode CONFD_ERR_BAD_KEYREF.