Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

send different http status (204 no content) with empty response #4304

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: b_b
[Submitted to the original trac issue database at 7.12pm, Friday, 16th March 2012]

Hi, currently Nominatim sends a response status 200 when a json request doesn't contains any result. We are encountring a problem with that in Mapstraction library, here is the issue page on github :

mapstraction/mxn#116

Anyway, it's not so hard to fix it in Mapastraction, but i was wondering about it would-it be possible to allow Nominatim to send ann error status (204 ?) when the search request doesn't return any result ?

@openstreetmap-trac
Copy link
Author

Author: lonvia
[Added to the original trac issue at 8.53pm, Thursday, 13th October 2016]

No result is not really an error, so I think status 200 is correct. The response is in any case an array and it seems ok to expect from a client to check the array size.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant