-
Notifications
You must be signed in to change notification settings - Fork 192
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
667/1 To square a bit error handling on the API side of our service. Fix #667 #678
Conversation
* Remove the previous helper for JSON errors * Modify the errorhandler in views.py * Adjust the API endpoint to use the new handler
It looks like this breaks the following:
Can you investigate? The expected behavior is that going to |
Instead we get a 404 on the response, which means we end up with an empty page. |
in https://github.com/webcompat/webcompat.com/blob/master/tests/functional/issues.js#L93-L101 'non-existant issues go to 404': function() {
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
// TODO: uh, update this in the future
.get(require.toUrl(url(999999)))
.findByCssSelector('#pageerror h1').getVisibleText()
.then(function (text) {
assert.include(text, '(404)', 'We\'re at the 404.');
});
}, On the CLI, a request returns a 200 HTML file, which it should not, so I guess it's why it's failing.
I will investigate later today. |
I think we just have to change the |
Ah yes! That's it! Thanks miketaylr. I was already going through the line of codes. Excellent. |
Ok hopefully the parsing is fine now. |
Locally I get now the 404 http://localhost:5000/404 |
Awesome! Looks good now, thanks @karlcow. |
667/1 To square a bit error handling on the API side of our service. Fix #667
r? @miketaylr