dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.21k stars 92 forks source link

Print errors if present when calling YouTube API #34

Closed geneccx closed 1 year ago

geneccx commented 1 year ago

All of my API calls were showing as errors in the Google console. Printing them helps with troubleshooting.

Some examples:

{'code': 403, 'message': 'The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.', 'errors': [{'message': 'The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.', 'domain': 'youtube.quota', 'reason': 'quotaExceeded'}]}
{'code': 403, 'message': 'Requests to this API youtube method youtube.api.v3.V3DataSearchService.List are blocked.', 'errors': [{'message': 'Requests to this API youtube method youtube.api.v3.V3DataSearchService.List are blocked.', 'domain': 'global', 'reason': 'forbidden'}], 'status': 'PERMISSION_DENIED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'API_KEY_SERVICE_BLOCKED', 'domain': 'googleapis.com', 'metadata': {'service': 'youtube.googleapis.com', 'consumer': 'projects/XXXXXXXXXX'}}]}