Opened 7 years ago

Closed 3 years ago

#4304 closed enhancement (wontfix)

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

Reported by: b_b Owned by: geocoding@…
Priority: minor Milestone:
Component: nominatim Version: 1.0
Keywords: Cc:

Description

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 :

https://github.com/mapstraction/mxn/issues/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 ?

Change History (2)

comment:1 Changed 7 years ago by datendelphin

Summary: Nomitatim sends empty response with status 200 oksend different http status (204 no content) with empty response
Type: defectenhancement

comment:2 Changed 3 years ago by Sarah Hoffmann

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.