mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 22:20:08 +01:00
feat: print error message on failed llm quote generation attempt
This commit is contained in:
@@ -233,7 +233,12 @@ public class GeneralUseHelpers(ApplicationDbContext db, IConfiguration appsettin
|
||||
else
|
||||
{
|
||||
// Handle the error
|
||||
JObject error = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||
Console.WriteLine($"[QuotifyBE] Error: response status code from API was {response.StatusCode}.");
|
||||
if (error != null && error["error"] != null && error["error"]!["message"] != null)
|
||||
{
|
||||
Console.WriteLine($" Error message: {error["error"]!["message"]}");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user