diff --git a/profiler/src/profiler/TracyLlmApi.cpp b/profiler/src/profiler/TracyLlmApi.cpp index 851848ad..7dfece3f 100644 --- a/profiler/src/profiler/TracyLlmApi.cpp +++ b/profiler/src/profiler/TracyLlmApi.cpp @@ -219,7 +219,12 @@ bool TracyLlmApi::ChatCompletion( const nlohmann::json& req, const std::function } return true; } - return false; + else + { + auto str = std::move( data.str ); + data.str.clear(); + throw std::runtime_error( "HTTP error " + std::to_string( http_code ) + ": " + str ); + } } bool TracyLlmApi::Embeddings( const nlohmann::json& req, nlohmann::json& response, bool separateConnection )