Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch Network exceptions and surface them as Box SDK exceptions #271

Closed
jmoldow opened this issue May 25, 2018 · 7 comments
Closed

Catch Network exceptions and surface them as Box SDK exceptions #271

jmoldow opened this issue May 25, 2018 · 7 comments

Comments

@jmoldow
Copy link
Contributor

jmoldow commented May 25, 2018

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.

@bts-dido
Copy link

@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.

@bts-dido
Copy link

@jmoldow @mattwiller Any update?

@mattwiller
Copy link
Contributor

@bts-dido Is the issue here that you're seeing the logged error response? If so, you may find the information over at #414 helpful

@bts-dido
Copy link

Thanks @mattwiller ! That helped.

@mattwiller
Copy link
Contributor

@bts-dido Great — glad to hear it!

@stale
Copy link

stale bot commented Dec 19, 2022

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.

@stale stale bot added the stale label Dec 19, 2022
@stale
Copy link

stale bot commented Dec 27, 2022

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.

@stale stale bot closed this as completed Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants