UI shows raw 'Failure.errorFailure(message: …)' text in six error messages
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Dart
- スター
- 2
- フォーク
- 2
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
basictech01/uniun のほかの issue
-
documentation good first issue P3-Low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
basictech01/uniun#328 ·
メンテナーはふだん 2 日以内に返信
-
bug good first issue P2-Medium
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
basictech01/uniun#305 ·
メンテナーはふだん 2 日以内に返信
-
enhancement P2-Medium
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
basictech01/uniun#329 ·
メンテナーはふだん 2 日以内に返信
-
bug good first issue P2-Medium
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
basictech01/uniun#324 ·
メンテナーはふだん 2 日以内に返信
-
bug good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
basictech01/uniun#316 ·
メンテナーはふだん 2 日以内に返信
basictech01/uniun の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
TomBursch/kitchenowl#1255 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
maplibre/flutter-maplibre#709 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
getlantern/lantern#9387 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
bannzai/medicalarm#602 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信