From 986d12b2c8624d0eff406efbbc6316f181f75228 Mon Sep 17 00:00:00 2001 From: abdul4samad Date: Tue, 5 Jan 2021 17:49:01 +0530 Subject: [PATCH 1/2] fix: googlemaps#697 Changed expected error message in to ApiException --- src/main/java/com/google/maps/errors/ApiException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/google/maps/errors/ApiException.java b/src/main/java/com/google/maps/errors/ApiException.java index a9ce3be3a..b262456f4 100644 --- a/src/main/java/com/google/maps/errors/ApiException.java +++ b/src/main/java/com/google/maps/errors/ApiException.java @@ -49,7 +49,7 @@ public static ApiException from(String status, String errorMessage) { } else if ("NOT_FOUND".equals(status)) { return new NotFoundException(errorMessage); } else if ("OVER_QUERY_LIMIT".equals(status)) { - if ("You have exceeded your daily request quota for this API." + if ("You have exceeded your daily request quota for this API. If you did not set a custom daily request quota, verify your project has an active billing account: http://g.co/dev/maps-no-account" .equalsIgnoreCase(errorMessage)) { return new OverDailyLimitException(errorMessage); } From 8d084a8d201ad6a9911a11a536c3856eda3f8b28 Mon Sep 17 00:00:00 2001 From: Abdul Samad Date: Tue, 5 Jan 2021 21:52:40 +0530 Subject: [PATCH 2/2] Update src/main/java/com/google/maps/errors/ApiException.java Co-authored-by: Justin Poehnelt --- src/main/java/com/google/maps/errors/ApiException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/google/maps/errors/ApiException.java b/src/main/java/com/google/maps/errors/ApiException.java index b262456f4..493fbf361 100644 --- a/src/main/java/com/google/maps/errors/ApiException.java +++ b/src/main/java/com/google/maps/errors/ApiException.java @@ -49,7 +49,7 @@ public static ApiException from(String status, String errorMessage) { } else if ("NOT_FOUND".equals(status)) { return new NotFoundException(errorMessage); } else if ("OVER_QUERY_LIMIT".equals(status)) { - if ("You have exceeded your daily request quota for this API. If you did not set a custom daily request quota, verify your project has an active billing account: http://g.co/dev/maps-no-account" + if ("You have exceeded your daily request quota for this API. If you did not set a custom daily request quota, verify your project has an active billing account." .equalsIgnoreCase(errorMessage)) { return new OverDailyLimitException(errorMessage); }