Skip to content

Commit

Permalink
Bing: raise GeocoderRateLimited for 429 instead of GeocoderQuotaExceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
KostyaEsmukov committed Mar 24, 2021
1 parent 0946a95 commit a825a5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geopy/geocoders/bing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from geopy.exc import (
GeocoderAuthenticationFailure,
GeocoderInsufficientPrivileges,
GeocoderQuotaExceeded,
GeocoderRateLimited,
GeocoderServiceError,
GeocoderUnavailable,
)
Expand Down Expand Up @@ -222,7 +222,7 @@ def _parse_json(self, doc, exactly_one=True):
elif status_code == 403:
raise GeocoderInsufficientPrivileges(err)
elif status_code == 429:
raise GeocoderQuotaExceeded(err)
raise GeocoderRateLimited(err)
elif status_code == 503:
raise GeocoderUnavailable(err)
else:
Expand Down

0 comments on commit a825a5d

Please sign in to comment.