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

Only store the API response if the status code was 200 and the response not empty #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

2ndkauboy
Copy link
Contributor

No description provided.

@2ndkauboy
Copy link
Contributor Author

See #20

@Zodiac1978
Copy link
Member

I'm not sure, this is enough.

Using the transient, things do not break at the moment too, but there is no feedback for the user.

So instead of just returning, we need to give some visual feedback for the user. This broken REST API was unseen for moths, maybe years. We need a notice if this bug happens, so what we could act to fix it.

@2ndkauboy 2ndkauboy force-pushed the api-status-code branch 2 times, most recently from c4c4ce0 to 7eddc46 Compare February 5, 2023 21:13
@2ndkauboy
Copy link
Contributor Author

@Zodiac1978 how about the new version? The widget now gets the API data only once a day, unless if the last response was an error, then again after 1 hour. If the request was successful, the meetups PHP array is built. It is then saved into an option. This option is always used, so hopefully the list will never be empty.

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.

2 participants