Open LocutusGrax opened 3 weeks ago
Seen that exception thrown from the Polarion server aren't defined into Python as a common class, it's Zeep that handle the Exceptions.
Zeep throws a Fault
that nest the web-service Exception for us.
The exact Exception thrown by Polarion in the Zeep client looks like this : com.polarion.platform.security.AuthenticationFailedException
An idea to grab the Exception would be to do smth like this :
try:
# <your code>
except Exception as e:
if "com.polarion.platform.security.AuthenticationFailedException" in str(e):
raise NotBroadException(e)
else:
raise Exception(e)
The script throws Exception when you get a login failure. Exception is borad exeption.
I need to be able to catch the real exception in my script, need to be able to handle login failure. A way to update code :