TF-4136 Apply early exit to prevent string operation in log

This commit is contained in:
dab246
2026-01-02 13:28:31 +07:00
committed by Dat H. Pham
parent 95534e28e0
commit fedb8fed93
23 changed files with 296 additions and 210 deletions
@@ -13,7 +13,7 @@ class AIDataSourceImpl implements AIDataSource {
try {
final apiResponse = await _aiApi.generateMessage(prompt);
return AIResponse(result: apiResponse.content);
} on DioError catch (e) {
} on DioException catch (e) {
throw Exception('Failed to generate AI text: ${e.message}');
} catch (e) {
throw Exception('Failed to generate AI text: $e');