TF-4136 Apply early exit to prevent string operation in log
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user