mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
Pipeline: Add LLM and mocked user generation to the pipeline (#230)
This commit is contained in:
@@ -48,21 +48,20 @@ std::string HttpWebClient::Get(const std::string& url) {
|
||||
const httplib::Result result = client.Get(path);
|
||||
|
||||
if (!result) {
|
||||
throw std::runtime_error(std::format(
|
||||
"[HttpWebClient] Request failed for URL: {} — {}", url,
|
||||
httplib::to_string(result.error())));
|
||||
throw std::runtime_error(
|
||||
std::format("[HttpWebClient] Request failed for URL: {} — {}", url,
|
||||
httplib::to_string(result.error())));
|
||||
}
|
||||
|
||||
if (result->status < kSuccessMin || result->status >= kSuccessMax) {
|
||||
if (logger_) {
|
||||
logger_->Log(
|
||||
{.level = LogLevel::Error,
|
||||
.phase = PipelinePhase::UserGeneration,
|
||||
.message =
|
||||
std::format("[HttpWebClient] Request failed for URL: {}", url)});
|
||||
logger_->Log({.level = LogLevel::Error,
|
||||
.phase = PipelinePhase::Enrichment,
|
||||
.message = std::format(
|
||||
"[HttpWebClient] Request failed for URL: {}", url)});
|
||||
}
|
||||
throw std::runtime_error(std::format("[HttpWebClient] HTTP {} for URL: {}",
|
||||
result->status, url));
|
||||
result->status, url));
|
||||
}
|
||||
|
||||
return result->body;
|
||||
|
||||
Reference in New Issue
Block a user