Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if error exists in response data #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sleepyeePanda
Copy link

An api_request() function checks only for 429 error.
but, 403 error could also be found in response data(variable named 'request').
403 error has 'Access Not Configured. YouTube Data API has not been used in project 1034474976246 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=1034474976246 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.' message.

so, I think may be you could add 403 error check code in api_request() or just simply check if 'error' exist in response data(variable named 'video_data_page) as I added the code.

print error if error exists in the api response data(video_data_page)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant