How to catch the error during topic publishing or if the mqtt server name is wrong

Hi,

I am new to mqtt in ignition, i tried the below code, which is working fine, But how to capture if there is any error during topic publishing or if the mqtt server name is wrong as the function returns None.

vTopic = "166/Operator"

var = system.cirruslink.engine.publish("ServerA", vTopic, "1", 1, 1)

print var

We do have a backlog task to return status on the success or failure of the publish.
You can view a successful publish in the logs by turning up the logger org.eclipse.tahu.mqtt.TahuClient to TRACE to see logs similar to “ME-24567f72-754d-4f24: Publishing on Topic xxx/yyy, Payload Size = 108” to verify publishing.