pelias / api

HTTP API for Pelias Geocoder
http://pelias.io
MIT License
221 stars 162 forks source link

debug-log: print placeholder response verbatim #1595

Closed missinglink closed 2 years ago

missinglink commented 2 years ago

While attempting to debug a query, I looked at the controller:placeholder debug log line and noticed that it doesn't actually show the response from placeholder 🤔

What's being rendered there instead is $res.data, which is the modified state of the response after the placeholder results have been merged with it.

I'm not sure of the history of this, which is several years old, but I would prefer to show the verbatim response from the microservice response in the logs so I can inspect the response data before it is merged.

cc/ @orangejulius thoughts?

orangejulius commented 2 years ago

Makes sense, the raw Placeholder result is more "unfamiliar" (looks like the API basically converts it to look like a result from Elasticsearch), but it's more truthful.