Исправление "двоения" ErrNotFound

This commit is contained in:
2025-10-30 01:50:32 +03:00
parent cd98d1f4a2
commit 644a94656a
4 changed files with 7 additions and 14 deletions

View File

@@ -191,7 +191,7 @@ func (data *SnapshotManagerData) DeleteSnapshot(ctx context.Context, snapshotID
snapshot, err := data.metadataStore.GetSnapshotMetadata(ctx, snapshotID)
if err != nil {
if errors.Is(err, store.ErrNotFound) {
if errors.Is(err, ErrNotFound) {
return nil
}
return fmt.Errorf("failed to check if snapshot exists: %w", err)
@@ -388,7 +388,7 @@ func (data *SnapshotManagerData) UpdateSnapshotMetadata(ctx context.Context, sna
snapshot, err := data.metadataStore.GetSnapshotMetadata(ctx, snapshotID)
if err != nil {
if errors.Is(err, store.ErrNotFound) {
if errors.Is(err, ErrNotFound) {
return ErrNotFound
}
return fmt.Errorf("failed to get snapshot metadata: %w", err)