Error handling for no source record found

This commit is contained in:
Simon Quigley 2024-12-16 19:01:10 -06:00
parent 57bd56b0d2
commit bdb1931876

View File

@ -157,6 +157,7 @@ void build::set_lp(launchpad* lp_ptr) {
}
const std::optional<source_package_publishing_history> build::getCurrentSourcePublication() {
if (current_source_publication_link.empty()) return std::nullopt;
auto response = lp->api_get(current_source_publication_link);
if (!response) return std::nullopt;
auto data = nlohmann::json::parse(response.value());