Repository navigation
fix(ifpaevents): stop crashing; explain a missing or rejected API key - #987
Merged
Merged
Conversation
- Fewer than 3 events no longer crashes (index out of range), nor does a location without a locality. - Shows a message when no IFPA API key is set, when IFPA rejects the key (it answers HTTP 200 with an error), and when there are no events nearby. Skips the cycle if IFPA is down or returns something that isn't JSON. - Rows read date (yellow), city (blue), tournament name (white), and wait 2 seconds before scrolling so the date can be read. - 64x64 panels show 6 events; the header place name is cut to fit. - A Max Distance that isn't a positive number falls back to 50 miles. - recommendedInterval 5 -> 60 (data is cached for an hour); README and previews updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Hello, I'm the original author of the IFPA Events app. I never got the SECRETS key working properly on Tidbyt, but in the fork over to Tronbyt that became a user-contributed field anyway.
The version here could crash or show a blank screen; this fixes that and makes the screens explain what's wrong.
This is my first time contributing so let me know if I'm doing something wrong.
Fixes
list index 2 out of range), nor does a location without alocality(key "locality" not in dict).{"error": "API_KEY was not found"}, which the app used to treat as data. It now shows "IFPA did not accept the API key".return []).Display
Other
recommendedInterval5 → 60: IFPA data is cached for an hour, so rendering every 5 minutes only repeated the same screen.Testing
pixlet checkpasses.mainfailed 6 of the 8.