tennisscores 0.02: readable error messages on the watch screen - #4320
Merged
thyttan merged 1 commit intoAug 17, 2026
Merged
Conversation
Follow-up to espruino#4316: replace the raw error text (unreadable at watch size) with short human messages -- No connection, Request timed out, Check API key, Not connected, Needs Gadgetbridge, Rate limited, Bad response -- centered and wrapped in the large font, with a small 'tap to retry' hint at the bottom. Unrecognised errors keep a short one-line detail in the small font so they stay debuggable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
|
Thanks! |
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.
Follow-up to #4316, as promised. When merging, @thyttan asked:
This fixes the presentation of every error state. Before, any failure dumped the raw rejection text ("Timeout", "Failed to connect to api.livetennisapi.com/0.0.0.0:443", ...) wrapped in the 6x8 font under a generic "Error" heading — unreadable at watch size, as in thyttan's screenshot. Now each failure is mapped to a short human message, centered and wrapped in the large (6x8 x2) font, with a small "tap to retry" hint at the bottom (tap was already the app's refresh gesture):
Bangle.http"Timeout")Error+ rawTimeoutin tiny fonterrstrings like "Failed to connect to ...", "Unable to resolve host ...")Not connected to BluetoothBangle.http(no Gadgetbridge/android app)Gadgetbridge required{"error":"unauthorized"})Bad response(misleading)Bad responseThe API error body (
{"error":"..."}) is now checked after JSON parse, which is what turns a 401 into "Check API key" instead of the old misleading "Bad response". The missing-key case (No API key / Set one in Settings) already had its own screen and is unchanged. No other behavior changes.Housekeeping per convention: version bumped to 0.02 in
metadata.json, ChangeLog line added.Checks:
bin/sanitycheck.jspasses (0 errors, 0 warnings) andeslint apps/tennisscores --max-warnings 0is clean.🤖 Generated with Claude Code