Open andreabisello opened 2 years ago
in the meanwhile i used the "raw" mode of zeep to read the response of the exception. https://docs.python-zeep.org/en/master/settings.html#context-manager
I was in similar situation and needed to have programmatic access to the error for good handling.
The solution for OP's question could be something like:
import zeep
history = zeep.plugins.HistoryPlugin()
client = zeep.Client(wsdl, plugins=[history])
...
try:
client.service.YourMethod()
except zeep.exceptions.Fault:
envelope = history.last_received["envelope"]
error_text = envelope.find(".//{*}RepositoryServiceAdmin.ErrorData").text
maybe simillar to https://github.com/mvantellingen/python-zeep/issues/392, my call returns a detail with the error (this is the debug xml)
the details is
but i'm not able to access from returned exception
how to access it?
thanks