2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00

report snapshot id if loading failed

This commit is contained in:
Michael Eischer 2023-05-01 17:24:13 +02:00
parent c0627dc80d
commit 88a7231217

View File

@ -61,7 +61,7 @@ func LoadSnapshot(ctx context.Context, loader LoaderUnpacked, id ID) (*Snapshot,
sn := &Snapshot{id: &id}
err := LoadJSONUnpacked(ctx, loader, SnapshotFile, id, sn)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to load snapshot %v: %w", id.Str(), err)
}
return sn, nil