Skip to content

Commit

Permalink
fix(backend): Do not crash the backend if some git revisions cannot b…
Browse files Browse the repository at this point in the history
…e found (#932)
  • Loading branch information
sasa-tomic authored Sep 17, 2024
1 parent 4baf7d7 commit 750186b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rs/ic-management-backend/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,13 @@ impl RegistryState {
releases.extend(
blessed_versions
.iter()
.map(|version| commit_to_release.get(version).unwrap().clone())
.filter_map(|version| match commit_to_release.get(version) {
Some(release) => Some(release.clone()),
None => {
error!("Failed to find release for version {}", version);
None
}
})
.sorted_by_key(|rr| rr.time)
.collect::<Vec<Release>>(),
);
Expand Down

0 comments on commit 750186b

Please sign in to comment.