From ca47e67c6e63de376e534f935027b10831aeba2f Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Thu, 14 Aug 2025 11:28:07 +0200 Subject: [PATCH] fix(observability): Adjusted wait handler: sometimes GetInstanceExecute returns nil for the instance Signed-off-by: Alexander Dahmen --- services/observability/wait/wait.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/observability/wait/wait.go b/services/observability/wait/wait.go index 8d7784c90..ec5f368e9 100644 --- a/services/observability/wait/wait.go +++ b/services/observability/wait/wait.go @@ -37,6 +37,9 @@ func CreateInstanceWaitHandler(ctx context.Context, a APIClientInterface, instan if err != nil { return false, nil, err } + if s == nil { + return false, nil, nil + } if s.Id == nil || s.Status == nil { return false, nil, fmt.Errorf("could not get instance id or status from response for project %s and instance %s", projectId, instanceId) } @@ -59,6 +62,9 @@ func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInterface, instan if err != nil { return false, nil, err } + if s == nil { + return false, nil, nil + } if s.Id == nil || s.Status == nil { return false, nil, fmt.Errorf("could not get instance id or status from response for project %s and instance %s", projectId, instanceId) } @@ -82,6 +88,9 @@ func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInterface, instan if err != nil { return false, nil, err } + if s == nil { + return false, nil, nil + } if s.Id == nil || s.Status == nil { return false, nil, fmt.Errorf("could not get instance id or status from response for project %s and instance %s", projectId, instanceId) }