aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geolocation/UniversalGeolocationProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geolocation/UniversalGeolocationProvider.java')
-rw-r--r--src/org/traccar/geolocation/UniversalGeolocationProvider.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/geolocation/UniversalGeolocationProvider.java b/src/org/traccar/geolocation/UniversalGeolocationProvider.java
index 320d0774b..48152f7df 100644
--- a/src/org/traccar/geolocation/UniversalGeolocationProvider.java
+++ b/src/org/traccar/geolocation/UniversalGeolocationProvider.java
@@ -43,7 +43,8 @@ public class UniversalGeolocationProvider implements GeolocationProvider {
try (JsonReader reader = Json.createReader(response.getResponseBodyAsStream())) {
JsonObject json = reader.readObject();
if (json.containsKey("error")) {
- callback.onFailure(new RuntimeException(json.getJsonObject("error").getString("message")));
+ callback.onFailure(
+ new GeolocationException(json.getJsonObject("error").getString("message")));
} else {
JsonObject location = json.getJsonObject("location");
callback.onSuccess(