Argus icon indicating copy to clipboard operation
Argus copied to clipboard

Bug: misspelled API urls return 404 HTML, not 404 JSON

Open hmpf opened this issue 9 months ago • 0 comments

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/.

hmpf avatar May 22 '25 12:05 hmpf