GET /u/by-external/{id}.json returns HTML on 404

(Victor van Poppelen) #1

The 404 response for /u/{username}.json returns JSON as expected:

{"errors":["The requested URL or resource could not be found."],"error_type":"not_found"}

However, /u/by-external/{external_id}.json doesn’t have the same behaviour. It returns JSON on success, but HTML on 404 (and I would assume for other errors as well), confusing my JSON parser.

(Sam Saffron) #2

@eviltrout perhaps this is one route that was missed in the rename?

(Robin Ward) #3

This is unrelated to the path change – by-external needs some hacks to recognize the format which NotFound was not respecting.

(long term we should probably figure out a nicer way around those hacks)

(Robin Ward) #4