AOSSIE-Org / AOSSIE-Org/Ell-ena
BUG:Unsafe JSON Decoding->the API returns a 500 error (HTML body) or network error, the app will crash.
- 主要言語
- Dart
- スター
- 54
- フォーク
- 110
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What happened?
### Unsafe JSON Decoding
- **Where**: `AIService.generateChatResponse`
- **Issue**: jsonDecode(response.body) is called without a try-catch block. If the API returns a 500 error (HTML body) or network error, the app will crash.
- **Fix**: Check response.statusCode before decoding and use try-catch.
- **why**?If the API returns a 500 error (HTML body) or network error, the app will crash.
@SharkyBytes Please checkout the fix here
### Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。