frostfs: Add object ID to error messages

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
Vitaliy Potyarkin 2024-10-17 11:21:50 +03:00
parent 597d147c7d
commit 10ccc57587

View file

@ -122,11 +122,11 @@ func (s *Storage) Delete(ctx context.Context, oid string) error {
Key: s.key,
})
if err != nil {
return fmt.Errorf("delete request: %w", err)
return fmt.Errorf("delete request (%s): %w", oid, err)
}
stat := res.Status()
if !status.IsSuccessful(stat) {
return fmt.Errorf("delete object: %w", stat.(error))
return fmt.Errorf("delete object (%s): %w", oid, stat.(error))
}
return nil
}