From 5b2fae2ad3efbc86bd8bf4989d6fde24d6fc1c87 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Mon, 7 Apr 2025 16:14:20 +0300 Subject: [PATCH] refactor: add error wrapping Signed-off-by: Oleksandr Redko --- pkg/instance/stop.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/instance/stop.go b/pkg/instance/stop.go index 1605ca16221..16c144b18e7 100644 --- a/pkg/instance/stop.go +++ b/pkg/instance/stop.go @@ -86,7 +86,7 @@ func waitForInstanceShutdown(ctx context.Context, inst *store.Instance) error { case <-ticker.C: updatedInst, err := store.Inspect(inst.Name) if err != nil { - return errors.New("failed to inspect instance status: " + err.Error()) + return fmt.Errorf("failed to inspect instance status: %w", err) } if updatedInst.Status == store.StatusStopped {