Incorrect query string in https://api.twitter.com/1.1/users/lookup.json returns 404 instead of 400


#1

i mistakenly put ‘ids’ instead of ‘user_id’ as the query parameter for users/lookup, and received back a 404. the proper http status for an invalid query parameters is 400. http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error

here is the (broken) requested URL:

https://api.twitter.com/1.1/users/lookup.json?ids=zzz

switching to:

https://api.twitter.com/1.1/users/lookup.json?user_id=zzzz

obviously fixed the problem

as an aside, i would suggest that if the API is going to return json with ‘ids’ as they key, the other endpoints should take ‘ids’ as a query parameter for the same semantic value. or conversely, return the json with ‘user_id’ and accept ‘user_id’ as the query parameter.