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

Different Exception Type between Sync and Async client #134

Closed
laucia opened this issue Mar 29, 2015 · 2 comments
Closed

Different Exception Type between Sync and Async client #134

laucia opened this issue Mar 29, 2015 · 2 comments

Comments

@laucia
Copy link
Contributor

laucia commented Mar 29, 2015

Swagger-py's HTTPError is an exact copy of request's one
https://github.com/Yelp/swagger-py/blob/master/swaggerpy/exception.py#L9-L21
https://github.com/kennethreitz/requests/blob/master/requests/exceptions.py#L13-L31

but the SynchronousHttpClient throws requests.exceptions.HTTPError, and AsynchronousHttpClient throws swaggerpy.exception.HTTPError which makes error handling closely tied to the client used.

replacing the HTTPError code in swaggerpy/exception.py by a from requests.exceptions import HTTPError could solve this and by backward compatible.

@dnephin
Copy link
Contributor

dnephin commented Mar 29, 2015

Duplicate of #100

@prat0318
Copy link
Contributor

prat0318 commented Apr 1, 2015

Closing it. Progress is tracked from now in #100.

@prat0318 prat0318 closed this as completed Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants