-
Notifications
You must be signed in to change notification settings - Fork 193
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
Make error handler code in views.py more DRY #929
Comments
@deepthivenkat do you want to take a look at this one? |
Yes..I will try this |
yes! I will try this On Sat, Mar 5, 2016 at 12:57 AM, Mike Taylor [email protected]
|
… error codes 400,401,403,404,500
… error codes 400,401,403,404,500
#958 r? @karlcow r? @miketaylr |
@deepthivenkat no reason except history, you can perfectly change it. That would be better for consistency. Thanks for catching that. Just be aware that
Feel free to add a commit for fixing this. |
… error codes 400,401,403,404,500
r? @karlcow |
Thanks @deepthivenkat
|
…y that caused the tests to fail
r? @karlcow Thanks for the review comments.Sorry for committing though the tests failed.I will make sure I run all the tests before performing commit from now on. I have maintained the same branch since I needed the code changes that I have done previously. |
Thanks @deepthivenkat The I want to have a second opinion for this. Because if it's just about 401, maybe this piece of code can disappear given we are handling it. |
@karlcow So we throw 401 for the following two cases?
Are they not two different errors? |
They might be I want to know which error GitHub is sending back and because @miketaylr worked on it. He might remember. :) If not, we can try to test this again. |
No problem. I will check which error it is returning back and come back with the details |
GitHubError occurs when github request fails: Other possible status codes due to client error alone could be 400 and 422(Unprocessable entity) The following is a sample response for a failed request : I also checked how the GitHubError class looks like.One way to check the error code that this class returns in out app is to flash the error code in app.errorhandler. But I do not know what I should append to webcompat url (in my case localhost:5000) so that I will get a GitHubError.Is there any tests written that asserts GitHubError? Please help |
r? @karlcow @miketaylr |
See @karlcow's comment at #928 (comment).
The text was updated successfully, but these errors were encountered: