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
1 changed files with 1 additions and 1 deletions

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