Skip to content

CourseRegistrationRepositoryのエラーハンドリングでError型もcatchするよう修正#591

Draft
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1779255355-fix-course-registration-error-handling
Draft

CourseRegistrationRepositoryのエラーハンドリングでError型もcatchするよう修正#591
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1779255355-fix-course-registration-error-handling

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

案件: Crashlytics Issue 81acd654738b8d5208a131903420f4f8

やったこと

  • CourseRegistrationRepositoryImpl の全メソッド (getCourseRegistrations, registerCourse, unregisterCourse) に、Dart の Error 型(TypeError, BuiltValueNullFieldError 等)もキャッチして DomainError に変換する catch 句を追加

確認したこと

  • 既存の on DomainError { rethrow; }on Exception catch の流れは変更なし
  • Exception を継承しない Error 型が発生した場合も DomainError(type: unknown) に変換されることを確認

メモ

  • Firebase Crashlytics で CourseRegistrationRepositoryImpl.getCourseRegistrations の fatal issue が検出された
  • 原因: on Exception catch は Dart の Error 型(TypeError, BuiltValueNullFieldError 等)をキャッチしない。APIレスポンスのマッピング中に Error が発生した場合、キャッチされずに PlatformDispatcher.instance.onError まで伝播し、fatal: true で Crashlytics に報告されていた
  • 修正: 各メソッドに catch (e, stackTrace) 句を追加し、Error 型も DomainError に変換してから throw するようにした

Link to Devin session: https://app.devin.ai/sessions/cff41c8980ce479bb7d41f46eac5d536
Requested by: @kantacky

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Original prompt from Kanta

SYSTEM:
=== BEGIN THREAD HISTORY (in #dotto_noti_firebase) ===
Unknown User (B09U62J7Y9M): Heads up! We detected a new fatal issue in Dotto!

Heads up! We detected a new fatal issue in Dotto! Issue 81acd654738b8d5208a131903420f4f8: package:dotto/repository/course_registration_repository.dart - CourseRegistrationRepositoryImpl.getCourseRegistrations

<most_recent_message>
Kanta Oikawa (U071TQ4TLTB): @Devin
これは何のエラー?
</most_recent_message>
=== END THREAD HISTORY ===

Thread URL: https://furarico.slack.com/archives/C09UMBBKCRG/p1779244509896679?thread_ts=1779244509.896679&amp;cid=C09UMBBKCRG

The latest message is the one right above that tagged you. The <most_recent_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration Bot added this to the 260521_ milestone May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant