Fix error message when Huggingface is down (#1586)

* Fix error message when Huggingface is down

* Edit message
This commit is contained in:
Ozan Armağan 2024-02-29 12:35:39 +03:00 committed by GitHub
parent f608656393
commit eb6ab00397
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -485,6 +485,10 @@ Option<nlohmann::json> EmbedderManager::get_public_model_config(const std::strin
return Option<nlohmann::json>(config);
}
if(res >= 500) {
return Option<nlohmann::json>(res, "Model repository is down. Status code: " + std::to_string(res));
}
return Option<nlohmann::json>(404, "Model not found");
}