Skip to content

Commit

Permalink
return error instead of nil
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
  • Loading branch information
everettraven committed Apr 12, 2023
1 parent f5f99c5 commit 6df3957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/core/catalogsource_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (r *CatalogSourceReconciler) checkUnpackJobComplete(ctx context.Context, jo
// Loop through the conditions and check for any fail conditions
for _, cond := range job.Status.Conditions {
if cond.Status == v1.ConditionTrue && cond.Type != batchv1.JobComplete {
return false, nil
return false, fmt.Errorf("unpack job has condition %q with a status of %q", cond.Type, cond.Status)
}
}
// No failures and job has a completion time so job successfully completed
Expand Down

0 comments on commit 6df3957

Please sign in to comment.