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

adding better exception handling #75

Merged
merged 4 commits into from
Oct 1, 2015
Merged

Conversation

greedo
Copy link
Contributor

@greedo greedo commented Sep 30, 2015

Addresses #69

  • Adds a BaseVimeoException class that grabs errors from JSON responses and surfaces them using Python's Exception
  • Adds individual Exceptions for each error case and passes the error message and status_code to BaseVimeoException

/cc @kenyavs @Dashron

@greedo greedo self-assigned this Sep 30, 2015
try:
json = request.json()
except:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can't parse the json we should use the request body as the entire error message (proxy problems etc. could cause this)

greedo added a commit that referenced this pull request Oct 1, 2015
adding better exception handling
@greedo greedo merged commit 6e07404 into vimeo:master Oct 1, 2015
@greedo greedo mentioned this pull request Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants