[http_request] Always return defined server response status (#7689)

This commit is contained in:
Clyde Stubbs
2024-10-29 11:12:32 +11:00
committed by GitHub
parent 858d97ccef
commit 88627095fb
4 changed files with 4 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ void HttpRequestUpdate::setup() {
void HttpRequestUpdate::update() {
auto container = this->request_parent_->get(this->source_url_);
if (container == nullptr) {
if (container == nullptr || container->status_code != 200) {
std::string msg = str_sprintf("Failed to fetch manifest from %s", this->source_url_.c_str());
this->status_set_error(msg.c_str());
return;