Skip to content

Commit

Permalink
fix(operator): Fix nil pointer exception in case of app not being fou…
Browse files Browse the repository at this point in the history
…nd (#233)
  • Loading branch information
bacherfl authored Oct 27, 2022
1 parent 71383c0 commit de9a016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operator/controllers/keptnworkloadinstance/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (r *KeptnWorkloadInstanceReconciler) Reconcile(ctx context.Context, req ctr
r.recordEvent(phase, "Warning", workloadInstance, "GetAppVersionFailed", "has failed since app could not be retrieved")
return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, fmt.Errorf("could not fetch AppVersion for KeptnWorkloadInstance: %+v", err)
} else if !found {
span.SetStatus(codes.Error, err.Error())
span.SetStatus(codes.Error, "app could not be found")
r.recordEvent(phase, "Warning", workloadInstance, "AppVersionNotFound", "has failed since app could not be found")
return reconcile.Result{Requeue: true, RequeueAfter: 10 * time.Second}, fmt.Errorf("could not find AppVersion for KeptnWorkloadInstance")
}
Expand Down

0 comments on commit de9a016

Please sign in to comment.