AOSSIE-Org / AOSSIE-Org/Ell-ena

BUG: Unchecked String Parsing in MeetingFormatter

未關閉
#266 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Dart
星號
54
分支
110
PR 合併指標
30 天內沒有已合併 PR

描述

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

## [BUG] MeetingFormatter crashes on invalid date strings
🔍 Description
The MeetingFormatter utility class currently uses DateTime.parse() to convert meeting dates. If the input data contains a date string that does not follow the ISO 8601 format (e.g., an empty string, "TBD", or a localized date), the application throws a FormatException. This causes the chat/summary view to crash instead of rendering a fallback.

🛠️ Steps to Reproduce
Call MeetingFormatter.formatMeetingSummaries() with a list of meetings.

Provide a meeting object where meeting_date is a non-ISO string, such as:
{'title': 'Test', 'meeting_date': '2025/05/25'}.

Observe the FormatException in the console/debug log.

✅ Expected Behavior
The formatter should attempt to parse the date safely. If parsing fails, it should default to a fallback string like "Unknown date" so the rest of the meeting summary can still be displayed to the user.

❌ Actual Behavior
The app encounters an unhandled FormatException and fails to render the summary component.

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。