Error handling for no source record found
This commit is contained in:
parent
57bd56b0d2
commit
bdb1931876
@ -157,6 +157,7 @@ void build::set_lp(launchpad* lp_ptr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const std::optional<source_package_publishing_history> build::getCurrentSourcePublication() {
|
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);
|
auto response = lp->api_get(current_source_publication_link);
|
||||||
if (!response) return std::nullopt;
|
if (!response) return std::nullopt;
|
||||||
auto data = nlohmann::json::parse(response.value());
|
auto data = nlohmann::json::parse(response.value());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user