Open mourtisma opened 4 years ago
@smunuswami @manivinesh
Hi everyone!
If you don't have time to look at this PR, feel free to ask someone else to do so.
I chose you two because you were my two first reviewer suggestions.
Thanks!
@smunuswami @manivinesh Hi everyone. This PR has been opened for months, now.
Can someone please have a look (or suggest someone who could) at it ? Thank you :)
Referenced Issue: #122
This PR tackles the following code improvements
When configuring the ET_Client, loading the WSDL and refreshing the token, the current code only raise base Exceptions, which are not ideal to handle for developers => Create a base class for exceptions raised by the
ET_Client
, and subclasses for the different scenarios (configuration, loading WSDL, token refresh)Potential HTTP errors coming from
requests
are not properly handled => UseResponse.raise_for_status
to handle HTTP error responses coming from requestsIn the
ET_Client
params,applicationType
, if notNone
or blank, can be anything => Handle that case properly, and raise a newConfigurationException
in case of unallowed valueI also added tests for these error scenarios, in a specific file,
FuelSDK/test_ET_Client_errors.py