Skip to content

Commit

Permalink
Merge pull request #915 from syself/ani/nil-ponter-server-not-found
Browse files Browse the repository at this point in the history
🐛 Don't use server number in the error message
  • Loading branch information
janiskemper authored Sep 15, 2023
2 parents c679c9d + 429e955 commit 6663cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/services/baremetal/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
}
Expand Down

0 comments on commit 6663cb5

Please sign in to comment.