Python CDB abort transaction API not displaying the custom message

Hi

I am using the below mentioned call in my python script to abort a transaction

error = “Commit failed”
cdb.sub_abort_trans(self.sock, _confd.ERRCODE_APPLICATION_INTERNAL, 0, 0, error)

I see the transaction getting aborted, but dont see the string “Commit failed” printed on the CLI console

@cohult Do you know the solution to print the custom string?

Drop the _INTERNAL part. The documentation for the Python API is a bit terse, but at least for the “low level” functionality it is pretty much 1 - 1 with the C API, where the documentation for cdb_sub_abort_trans() (in the confd_lib_cdb(3) man page) says: Details can be found in the EXTENDED ERROR REPORTING section in the confd_lib_lib(3) manpage. - and that section says:

   CONFD_ERRCODE_APPLICATION_INTERNAL
       As CONFD_ERRCODE_APPLICATION, but the additional error information
       is only for logging/debugging, and should not be reported by
       northbound agents.

I.e. it seems it is working as designed and documented.

Cool. Thank you. That solved it