gchq / gaffer-tools

gaffer-tools is deprecated. Use https://github.com/gchq/gafferpy instead
Apache License 2.0
50 stars 29 forks source link

Gafferpy requests connector exception handling bug #901

Closed t92549 closed 3 years ago

t92549 commented 3 years ago

Right now the http error code fails to get generated as response.status_code is an int. It would also be nice if the error was thrown in a variable to make the code easier to understand:

https://github.com/gchq/gaffer-tools/blob/cc6d0439ce068142e201e8a48ed4756e0d49de63/python-shell/src/gafferpy/gaffer_connector_requests.py#L101-L103

As well as this it would be nice if tests were added for throwing connection errors, and the new connector.

This issue was created in retrospect of @j8934893 finding and fixing these bugs in #900