box-python-sdk
box-python-sdk copied to clipboard
Catch Network exceptions and surface them as Box SDK exceptions
Right now, our use of requests isn't invisible because we don't catch requests exceptions. This means that the user has to either catch requests exceptions too, or these could crash their program.
@jmoldow How can I catch request exception?
I'm seeing request exception message like below while catching BoxAPIException.
"POST https://api.box.com/2.0/folders" 409 312
{'Date': 'Tue, 18 Jun 2019 07:42:42 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'BOX-REQUEST-ID': '0ehidqbgqof5tssmbtrkntj3rti'}
I'm using SDK version 2.4.1.
@jmoldow @mattwiller Any update?
@bts-dido Is the issue here that you're seeing the logged error response? If so, you may find the information over at https://github.com/box/box-python-sdk/issues/414 helpful
Thanks @mattwiller ! That helped.
@bts-dido Great — glad to hear it!
This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.