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 172451a + eb12ef5 commit 20655c7Copy full SHA for 20655c7
src/Geolocation.php
@@ -79,6 +79,11 @@ protected function doCall($parameters = array())
79
// redefine response as json decoded
80
$response = json_decode($response);
81
82
+ // API returns with an error
83
+ if (isset($response->error_message)) {
84
+ throw new GeolocationException($response->error_message);
85
+ }
86
+
87
// return the content
88
return $response->results;
89
}
0 commit comments