UI shows raw 'Failure.errorFailure(message: …)' text in six error messages
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 78/100
Rechercherichtung
Read lib/core/error/failures.dart and test/TESTING.md, then inspect the six listed UI call sites and the four exception-wrapping call sites in gana_engine.dart and receive_share_bloc.dart. Trace whether the wrapped errors reach a screen, and add the requested widget tests for each UI spot. Done when the SnackBars show boom without the union text and the other listed paths use the message where it reaches users.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What users see
Some error messages show Dart's internal text instead of the message. For example, a failed relay add shows
Could not add relay: Failure.errorFailure(message: connection refused)
instead of Could not add relay: connection refused.
Cause
Failure is a freezed union, so toString() prints the variant name and field (Failure.errorFailure(message: …)). Failure.toMessage() (lib/core/error/failures.dart) returns just the message, and 49 call sites already use it. These six UI spots call toString() instead:
| File | Line | Shown to the user |
|---|---|---|
lib/common/widgets/relay_selector_field.dart |
113 | add-relay error |
lib/features/settings/widgets/identity_card.dart |
389 | add-relay error |
lib/features/settings/widgets/identity_card.dart |
429 | relay error |
lib/features/settings/widgets/logout_button.dart |
126 | logout error |
lib/common/qr/uniun_qr_scanner_page.dart |
120 | QR-login failed |
lib/common/qr/uniun_qr_scanner_page.dart |
158 | follow from QR failed |
Four more spots wrap f.toString() in an exception: gana_engine.dart lines 616, 642 and 693, and receive_share_bloc.dart line 305. That raw text then becomes the exception's message. Check whether any of it reaches the screen, for example a Gana run's failure reason.
Fix
- Replace
f.toString()withf.toMessage()at each UI spot. - For each spot, add a widget test that makes the use case return
Left(Failure.errorFailure('boom'))and expectsboomwithoutFailure.errorFailure(in the SnackBar. Followtest/TESTING.md.
Small and self-contained, so a good first issue.
- Vorherrschende Sprache
- Dart
- Sterne
- 2
- Forks
- 2
- Ø Merge
- 3 T. 5 Std.
- Gemergte PRs (30 T.)
- 10
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus basictech01/uniun
-
documentation good first issue P3-Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
basictech01/uniun#328 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug good first issue P2-Medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
basictech01/uniun#305 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
enhancement P2-Medium
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
basictech01/uniun#329 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug good first issue P2-Medium
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
basictech01/uniun#324 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
app performance is slowOffenbug good first issue
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 18/100
basictech01/uniun#316 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in basictech01/uniun
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
TomBursch/kitchenowl#1255 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Backend Subtask SW VTA
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
aau-giraf/visual-tangible-artefacts#507 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue p1
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
VeryGoodOpenSource/vgv-ai-flutter-plugin#217 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug useful
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
hiddify/hiddify-app#2709 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
ccch1mneyyy/dsh-Go#2068 ·
Maintainer antworten meist innerhalb von 1 Tag