Here is my request URL:
http://server.com/app/user/getuser/?userId=9999
Note that userId
is query parameter. Not embedded path parameter.
I understand that if the request URL is: http://server.com/app/user/getuser/9999 and the ID 9999 does not exist in database, The code 404 should be used.
BUT what HTTP status should be used for the case userId
is query parameter? Right now I am returning 400 instead of 404.