Skip to content

Commit 813b270

Browse files
committed
TomTom provider: handle "Developer Inactive" error
1 parent 204a3fd commit 813b270

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Geocoder/Provider/TomTom.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ private function executeQuery($query)
104104

105105
$content = (string) $this->getAdapter()->get($query)->getBody();
106106

107+
if (false !== stripos($content, "Developer Inactive")) {
108+
throw new InvalidCredentials('Map API Key provided is not valid.');
109+
}
110+
107111
try {
108112
$xml = new \SimpleXmlElement($content);
109113
} catch (\Exception $e) {

0 commit comments

Comments
 (0)