From e9b36b5d49c427d33478bea3f657133d848d2514 Mon Sep 17 00:00:00 2001 From: eee4 <41441600+eee4@users.noreply.github.com> Date: Tue, 29 Jul 2025 11:11:28 +0200 Subject: [PATCH] feat: print error message on failed llm quote generation attempt --- Controllers/GeneralUseHelperFunctions.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Controllers/GeneralUseHelperFunctions.cs b/Controllers/GeneralUseHelperFunctions.cs index b1dffb3..226bf32 100644 --- a/Controllers/GeneralUseHelperFunctions.cs +++ b/Controllers/GeneralUseHelperFunctions.cs @@ -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; } }