Send error when fetching remote assets fails

This commit is contained in:
Yves
2025-03-26 09:21:22 +01:00
parent 25ff9b6fa0
commit ce248aae64

View File

@@ -255,6 +255,9 @@ void HttpServer::HandleGet(const httplib::Request &req,
auto result = client.Get(req.path, req.params, {{"User-Agent", user_agent}});
if (!result) {
res.status = 500;
res.set_content("Could not fetch: '" + req.path + "' from '" + remote_url +
"': " + to_string(result.error()),
"text/plain");
return;
}