Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c2f1e98 + 732886e commit fa2bc39Copy full SHA for fa2bc39
src/Geocoder/Provider/GoogleMaps.php
@@ -10,6 +10,7 @@
10
11
namespace Geocoder\Provider;
12
13
+use Exception;
14
use Geocoder\Exception\InvalidCredentials;
15
use Geocoder\Exception\NoResult;
16
use Geocoder\Exception\QuotaExceeded;
@@ -157,6 +158,11 @@ private function executeQuery($query)
157
158
throw new InvalidCredentials(sprintf('API key is invalid %s', $query));
159
}
160
161
+ if ('REQUEST_DENIED' === $json->status) {
162
+ throw new Exception(sprintf('API access denied. Request: %s - Message: %s',
163
+ $query, $json->error_message));
164
+ }
165
+
166
// you are over your quota
167
if ('OVER_QUERY_LIMIT' === $json->status) {
168
throw new QuotaExceeded(sprintf('Daily quota exceeded %s', $query));
0 commit comments