pelias / api

HTTP API for Pelias Geocoder

Home Page:http://pelias.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duplicate invalid param 'text' warning for /v1/search

missinglink opened this issue · comments

/v1/search

Screenshot 2022-04-21 at 12 18 02

/v1/autocomplete

Screenshot 2022-04-21 at 12 18 12

Wow, never noticed that before. I wonder where it comes from.

I think the core issue is that the 'combining sanitizers' (such as https://github.com/pelias/api/blob/master/sanitizer/search.js) should return immediately upon error rather than running through the rest of the route chain.

ie. here https://github.com/pelias/api/blob/master/sanitizer/sanitizeAll.js#L94 it should return something to trigger the err in express middleware (req, res, err).