-
Notifications
You must be signed in to change notification settings - Fork 0
Description
🔍 Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
🐞 Description of the bug
#778 introduced the feature of deserializing the response from the server for non-200 responses and attaching them to the exception.
This is fine if the deserialization succeeds, but if the deserialization fails then we end up with a deserialization error (probably a ValueError or KeyError), which is raised as a result of raising the ApiException. I suggest that this is unexpected, since the important thing is that the request failed, the processing is secondary to this.
We should either ignore the fact that the deserialization failed and raise the ApiException anyway or potentially raise an ExceptionGroup. We still support Python 3.10 though, so we probably need to ignore the secondary exception for now, and maybe look at adding the ExceptionGroup later on.
📝 Steps to reproduce
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
No response
🐍 Which Python version are you using?
3.10
📦 Installed packages
-