From 429e955e4a350f5fd9eee908bb8f07ea28e804a8 Mon Sep 17 00:00:00 2001 From: Aniruddha Basak Date: Fri, 15 Sep 2023 09:27:12 +0530 Subject: [PATCH] Don't use server number in the error message Signed-off-by: Aniruddha Basak --- pkg/services/baremetal/host/host.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/baremetal/host/host.go b/pkg/services/baremetal/host/host.go index dce685d97..a4a8574f2 100644 --- a/pkg/services/baremetal/host/host.go +++ b/pkg/services/baremetal/host/host.go @@ -138,7 +138,7 @@ func (s *Service) actionPreparing() actionResult { if err != nil { s.handleRateLimitExceeded(err, "GetBMServer") if models.IsError(err, models.ErrorCodeServerNotFound) { - return s.recordActionFailure(infrav1.RegistrationError, fmt.Sprintf("bare metal host with id %v not found", server.ServerNumber)) + return s.recordActionFailure(infrav1.RegistrationError, fmt.Sprintf("bare metal host with id %d not found", s.scope.HetznerBareMetalHost.Spec.ServerID)) } return actionError{err: fmt.Errorf("failed to get bare metal server: %w", err)} }