From 5fd44182206b7f708661351e6a330902075c6d10 Mon Sep 17 00:00:00 2001 From: zachharris1 <69470481+zachharris1@users.noreply.github.com> Date: Tue, 23 Feb 2021 11:25:57 -0500 Subject: made rate limit error messages more clear (#27) * made rate limit error messages more clear * Revert "made rate limit error messages more clear" This reverts commit c7b57ab1cf7988a80bf3eb4347c93ac0dd3d93b4. * log message directly from google --- tap_google_sheets/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_google_sheets/client.py b/tap_google_sheets/client.py index 4f38352..bce00ce 100644 --- a/tap_google_sheets/client.py +++ b/tap_google_sheets/client.py @@ -230,7 +230,7 @@ class GoogleClient: # pylint: disable=too-many-instance-attributes #Use retry functionality in backoff to wait and retry if #response code equals 429 because rate limit has been exceeded if response.status_code == 429: - raise Server429Error() + raise Server429Error(response.json().get("error",{}).get("message", "Rate limit exceeded")) if response.status_code != 200: raise_for_error(response) -- cgit v1.2.3