Only store the API response if the status code was 200 and the response not empty#26
Open
Only store the API response if the status code was 200 and the response not empty#26
Conversation
Contributor
Author
|
See #20 |
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. |
c4c4ce0 to
7eddc46
Compare
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. |
7eddc46 to
69d2fc2
Compare
69d2fc2 to
05dd739
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.