arenanet / api-cdi

Collaborative Development Initiative for Public APIs
253 stars 41 forks source link

Requesting a resource with an unknown identifier results in incorrect HTTP result status code #17

Closed tidal closed 9 years ago

tidal commented 9 years ago

Example requests with unknown IDs:

When requesting these "resources" the server sends back a HTTP status code 400. Status Code 400 is defined as: http://tools.ietf.org/html/rfc2616#section-10.4.1 "The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications."

Since the requests are not malformed, but the resource is unknown, the server should respond with a 404 status code (or a 410 if the resource has been available before).

lye commented 9 years ago

Makes sense to me. Just committed a fix, will get deployed at some point in the future.

lye commented 9 years ago

Live endpoints are now returning 404 for unknown/invalid IDs.