You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I as a developer would like to see message from provider response rather than generic The geocoder server returned an invalid response (%d) for query "%s". We could not parse it. message.
The main issue that each provider has their own response structure in case of bad request occurs. I don't see a good solution here so far and I have only 2 thoughts so far:
We could add another abstract method like abstract protected function throwClientException(string $message) method inside of an AbstractHttpProvider class. And each provider have to implement it.
I suppose it is kind of feature request.
The text was updated successfully, but these errors were encountered:
Hey guys.
So I as a developer would like to see message from provider response rather than generic
The geocoder server returned an invalid response (%d) for query "%s". We could not parse it.
message.We faced with an issue which is pretty hard to debug on dockerized application. It would be much easier to understand what went wrong if we get message from particular provider response in case
InvalidServerResponse
is thrown on line: https://github.com/geocoder-php/Geocoder/blob/master/src/Http/Provider/AbstractHttpProvider.php#L78The main issue that each provider has their own response structure in case of bad request occurs. I don't see a good solution here so far and I have only 2 thoughts so far:
getParsedResponse
method need to be an abstract so each provider will implement their own mechanism of catching errors.https://github.com/geocoder-php/Geocoder/blob/master/src/Http/Provider/AbstractHttpProvider.php#L68-L87
abstract protected function throwClientException(string $message)
method inside of anAbstractHttpProvider
class. And each provider have to implement it.I suppose it is kind of feature request.
The text was updated successfully, but these errors were encountered: