danylokhodus commited on
Commit
248dd04
·
1 Parent(s): 7f6be95

debug: include model name in Gemini API exception

Browse files
FlowAPI.Application/Services/AIService.cs CHANGED
@@ -176,7 +176,7 @@ namespace FlowAPI.Application.Services
176
 
177
  if (!response.IsSuccessStatusCode)
178
  {
179
- throw new Exception($"Gemini API error (Status {response.StatusCode}): {responseString}");
180
  }
181
 
182
  using var doc = JsonDocument.Parse(responseString);
 
176
 
177
  if (!response.IsSuccessStatusCode)
178
  {
179
+ throw new Exception($"Gemini API error (Status {response.StatusCode}) with model '{model}': {responseString}");
180
  }
181
 
182
  using var doc = JsonDocument.Parse(responseString);