Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More RusticErrors from tests
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
simonsan committed Oct 26, 2024
1 parent 85c3c9b commit c45ede8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions crates/core/src/repofile/snapshotfile.rs
Original file line number Diff line number Diff line change
@@ -566,10 +566,15 @@ impl SnapshotFile {
}
}
}

p.finish();
latest
.ok_or_else(|| SnapshotFileErrorKind::NoSnapshotsFound)
.map_err(|_err| todo!("Error transition"))

latest.ok_or_else(|| {
RusticError::new(
ErrorKind::Repository,
"No snapshots found. Please make sure there are snapshots in the repository.",
)
})
}

/// Get a [`SnapshotFile`] from the backend by (part of the) id

0 comments on commit c45ede8

Please sign in to comment.