Skip to content

Commit 9ae5a09

Browse files
stuggixek
authored andcommitted
Make sure to log error in findObjectsForSrc()
It is hidden right now if there is an error in configured named fields and index. Lets log the error and return the current state of requests. With this the findObjectsForSrc() will exit with an hidden error like: "error": "Index with name field:.spec.ksmTls.caBundleSecretName does not exist" Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent d435e5c commit 9ae5a09

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

controllers/keystoneapi_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ func (r *KeystoneAPIReconciler) findObjectsForSrc(ctx context.Context, src clien
362362
}
363363
err := r.List(ctx, crList, listOps)
364364
if err != nil {
365-
return []reconcile.Request{}
365+
Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace()))
366+
return requests
366367
}
367368

368369
for _, item := range crList.Items {

0 commit comments

Comments
 (0)