aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-24 10:49:38 -0700
committerGitHub <noreply@github.com>2021-06-24 10:49:38 -0700
commit229a96994136ad468264f8a084748c4fc17d35f1 (patch)
tree4ad42249c36c8f3cfa4b8cd46e3df8f6c68e2681
parent48670633fd49e3ec2bd781f858b11ccd2083878d (diff)
parent93d750a57b7ecdcad6e62bf75b97e804d7f45eac (diff)
downloadtrackermap-server-229a96994136ad468264f8a084748c4fc17d35f1.tar.gz
trackermap-server-229a96994136ad468264f8a084748c4fc17d35f1.tar.bz2
trackermap-server-229a96994136ad468264f8a084748c4fc17d35f1.zip
Merge pull request #4707 from Elsensee/geocoder-fix-exception
Catch all webexceptions in JsonGeocoder
-rw-r--r--src/main/java/org/traccar/geocoder/JsonGeocoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/geocoder/JsonGeocoder.java b/src/main/java/org/traccar/geocoder/JsonGeocoder.java
index 4f34fb973..3cd5b596e 100644
--- a/src/main/java/org/traccar/geocoder/JsonGeocoder.java
+++ b/src/main/java/org/traccar/geocoder/JsonGeocoder.java
@@ -22,7 +22,7 @@ import org.traccar.Main;
import org.traccar.database.StatisticsManager;
import javax.json.JsonObject;
-import javax.ws.rs.ClientErrorException;
+import javax.ws.rs.WebApplicationException;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.InvocationCallback;
import java.util.AbstractMap;
@@ -116,7 +116,7 @@ public abstract class JsonGeocoder implements Geocoder {
} else {
try {
return handleResponse(latitude, longitude, request.get(JsonObject.class), null);
- } catch (ClientErrorException e) {
+ } catch (WebApplicationException e) {
LOGGER.warn("Geocoder network error", e);
}
}