diff --git a/api/cluster/controller.go b/api/cluster/controller.go index 723bdf1a1..468524f28 100644 --- a/api/cluster/controller.go +++ b/api/cluster/controller.go @@ -227,7 +227,7 @@ func (c *controller) Deploy(ctx context.Context, modelService *models.Service) ( s, err := c.kserveClient.InferenceServices(modelService.Namespace).Get(modelService.Name, metav1.GetOptions{}) if err != nil { if !kerrors.IsNotFound(err) { - return nil, errors.Wrapf(err, "unable to check status of inference service: %s", s.Name) + return nil, errors.Wrapf(err, "unable to check status of inference service: %s", modelService.Name) } s, err = c.kserveClient.InferenceServices(modelService.Namespace).Create(spec) if err != nil { diff --git a/api/cluster/controller_test.go b/api/cluster/controller_test.go index df2792cba..1071a689c 100644 --- a/api/cluster/controller_test.go +++ b/api/cluster/controller_test.go @@ -471,7 +471,7 @@ func TestController_DeployInferenceService(t *testing.T) { }, checkResult: &inferenceServiceReactor{ nil, - kerrors.NewNotFound(schema.GroupResource{}, ""), + errors.New("error check"), }, deployTimeout: deployTimeout, createPdbResult: &pdbReactor{pdb, nil},