Argus
Argus copied to clipboard
Bug: misspelled API urls return 404 HTML, not 404 JSON
Compare fetching a misspelled url (some "i"'s replaced by "1"):
curl -X 'GET' 'http://127.0.0.1:8000/api/v2/not1f1cat1onprof1les/100000000/' -H 'Accept: application/json' -H 'Authorization: Token <CENSORED>'
to an url to an object that does not exist:
curl -X 'GET' 'http://127.0.0.1:8000/api/v2/notificationprofiles/100000000/' -H 'Accept: application/json' -H 'Authorization: Token <CENSORED>'
The first returns HTML, the second JSON. They should both return JSON for all urls under /api/.