-
Notifications
You must be signed in to change notification settings - Fork 20
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
update afragen/translations-updater with error caching/logging #199
base: translations
Are you sure you want to change the base?
Conversation
Fixes #200 |
Hopefully fixes #188 |
the #188 issue is solved in the fix. But i am getting follow PHP warning when the 403 kicks in on language-pack.json ``Undefined property: stdClass::$name `
|
Well maybe it not quite the fix. |
I'm thinking it might be better to return a WP_Error for a validation failure. |
Getting two PHP warnings now when 403 comes.
|
But i see also in the debug logs
|
Is this with current change back to returning false? |
Just finished an update to the error handling. It should now degrade gracefully and document API timeout errors in the error log. |
Tested on the https://github.com/afragen/aspireupdate/tree/error-cache-logging bransch and the PHP warnings are gone and it’s caching if the rate limit is hit so it will not pound the GitHub API. |
Added API error caching for 60 min as GitHub API rate limits unauthenticated requests for 60 requests/hour. Leaves an entry in the debug.log