EDSM-NET / FrontEnd

Issues tracker for EDSM
https://www.edsm.net/
37 stars 1 forks source link

API should return 404 when system is not found #335

Closed MKaras93 closed 4 years ago

MKaras93 commented 4 years ago

Currently when you query a made up system, for example foo: GET https://www.edsm.net/api-system-v1/traffic?systemName=foo the response body is just an empty dict {} with HTTP status 200 OK.

Expected behavior: API should respond with HTTP status 404 NOT FOUND - https://httpstatuses.com/404

200 OK should only be returned if the requested data is present in the response.

AnthorNet commented 4 years ago

As much as I agree with this, changing the current behavior with all software using them is just not possible :)

MKaras93 commented 4 years ago

I thought that's what versioning is for ;) Any plans for api-system-v2 then?