Confd Set Error Callback for Actions

I am using the acton_seterr_extended, it works but the error message comes back with some unwanted string [the configuration database is locked:]. Why does it appear and how can I get rid of that?

Action:


dp.action_seterr_extended(self.uinfo,_confd.CONFD_ERR,0,0,“Incorrect Old Password”)

Output:


operation-failed xxx/xxx/xxx/xxx the configuration database is locked: Incorrect Old Password

Also, what other error codes are there that can be used, apart from CONFD_ERR?

The error codes you can use with xxx_seterr_extended() is documented in the section EXTENDED ERROR REPORTING in the confd_lib_lib(3) man-page:

In there you can also find this description:

The fmt and remaining arguments can specify an arbitrary string as for confd_trans_seterr(), but when used with one of the code values that has a specific meaning, it should only be given if it has some additional information - e.g. passing “In use” with CONFD_ERRCODE_IN_USE is not meaningful, and will typically result in duplicated information being reported by the northbound agent. If there is no additional information, just pass an empty string ("") for fmt.

A call of confd_trans_seterr(tctx, "string") is equivalent to confd_trans_seterr_extended(tctx, CONFD_ERRCODE_APPLICATION, 0, 0, "string"), i.e. CONFD_ERRCODE_APPLICATION does not have a pre-defined error string.