Skip to content

check if error exists in response data#6

Open
sleepyeePanda wants to merge 1 commit into
mitchelljy:masterfrom
sleepyeePanda:master
Open

check if error exists in response data#6
sleepyeePanda wants to merge 1 commit into
mitchelljy:masterfrom
sleepyeePanda:master

Conversation

@sleepyeePanda

Copy link
Copy Markdown

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