Show per-item translated error messages on /reader operations#14
Open
MojRezakhani wants to merge 1 commit into
Open
Show per-item translated error messages on /reader operations#14MojRezakhani wants to merge 1 commit into
MojRezakhani wants to merge 1 commit into
Conversation
Previously, when secure/unsecure/edit/clear operations failed, errors
were only logged to the browser console — the user saw no indication
that something went wrong.
Now:
- Each reader item shows its own error inline within its card
- Same alert style as /tagging (icon + text)
- Auto-clears after 5 seconds
- Cleared immediately on retry
- Pattern-matches common errors: wrong password, tag not found,
reader unreachable, tag locked, authentication failed
- Paraglide support (EN + DE)
Also fixes a few translation inconsistencies discovered along the way:
- multiple_tags_detected_message: en.json had German text; added missing
German version
- reader_initialisation_failure_message: de.json had wrong spelling
(with 'z' instead of 's') that didn't match the code; renamed and
fixed a typo (Lesegräte -> Lesegeräts)
Root causes fixed:
1. reader.secure/unsecure/edit/clear return { success, message } instead
of throwing, so the existing catch blocks never fired
2. Backend returns errors in the 'error' field but feig.ts only read
'message', so error text was lost
|
@MojRezakhani is attempting to deploy a commit to the lerche's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Previously, when secure/unsecure/edit/clear operations failed, errors were only logged to the browser console — the user saw no indication that something went wrong.
Now:
Also fixes a few translation inconsistencies discovered along the way:
Root causes fixed: