]> git.immae.eu Git - github/fretlink/tap-google-sheets.git/commitdiff
made rate limit error messages more clear (#27)
authorzachharris1 <69470481+zachharris1@users.noreply.github.com>
Tue, 23 Feb 2021 16:25:57 +0000 (11:25 -0500)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 16:25:57 +0000 (11:25 -0500)
* 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

index 4f38352ed91dcf08c8da73c502cb55b40b9fa919..bce00cea4ab8aa40d4b64370c032165ccdbb6bc9 100644 (file)
@@ -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)