UI shows raw 'Failure.errorFailure(message: …)' text in six error messages
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Dart
- Estrellas
- 2
- Forks
- 2
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de basictech01/uniun
-
documentation good first issue P3-Low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
basictech01/uniun#328 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue P2-Medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
basictech01/uniun#305 ·
Los mantenedores suelen responder en 2 días
-
Study: upgrade flutter_edge_ai 2.3.2 → 2.7.2 — workarounds we can drop, new features, impactAbiertoenhancement P2-Medium
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
basictech01/uniun#329 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue P2-Medium
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
basictech01/uniun#324 ·
Los mantenedores suelen responder en 2 días
-
app performance is slowAbiertobug good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
basictech01/uniun#316 ·
Los mantenedores suelen responder en 2 días
Todos los issues de basictech01/uniun
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
TomBursch/kitchenowl#1255 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
maplibre/flutter-maplibre#709 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
getlantern/lantern#9387 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
bannzai/medicalarm#602 · 2 comentarios ·
Los mantenedores suelen responder en 1 día