From 90b6ed8a404fdd0daea3251884644e20425efdd7 Mon Sep 17 00:00:00 2001 From: DestroyerIV <32944302+DestroyerIV@users.noreply.github.com> Date: Mon, 27 May 2019 20:05:22 +0200 Subject: [PATCH] Update poke.io.js Catch New Error --- poke.io.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/poke.io.js b/poke.io.js index 30a1b11..d484226 100644 --- a/poke.io.js +++ b/poke.io.js @@ -895,6 +895,10 @@ function Pokeio() { geocoder.geocode(locationName, function (err, data) { if (err || data.status === 'ZERO_RESULTS') { return callback(new Error('location not found')); + }; + + if (data.status == 'REQUEST_DENIED'){ + return callback(new Error(data.error_message)) } var _data$results$0$geome = data.results[0].geometry.location;