// handleReconcileError will handle errors from reconcile handlers, which
// respects runtime errors.
handleReconcileError will handle errors from reconcile handlers, which
respects runtime errors.
// handleReconcileError will handle errors from reconcile handlers which // respects runtime errors .
func (r *fieldExportReconciler) handleReconcileError(err error) (ctrlrt.Result, error) {
	if err == nil || err == ackerr.Terminal {
		return ctrlrt.Result{}, nil
	}
	var requeueNeededAfter *requeue.RequeueNeededAfter
	if errors.As(err, &requeueNeededAfter) {
		after := requeueNeededAfter.Duration()
		r.log.V(1).Info(
			"requeue needed after error",
			"error", requeueNeededAfter.Unwrap(),
			"after", after,
		)
		return ctrlrt.Result{RequeueAfter: after}, nil
	}
	var requeueNeeded *requeue.RequeueNeeded
	if errors.As(err, &requeueNeeded) {
		r.log.V(1).Info(
			"requeue needed error",
			"error", requeueNeeded.Unwrap(),
		)
		return ctrlrt.Result{Requeue: true}, nil
	}
	var noRequeue *requeue.NoRequeue
	if errors.As(err, &noRequeue) {
		r.log.V(1).Info(
			"error did not need requeue",
			"error", noRequeue.Error(),
		)
		return ctrlrt.Result{}, nil
	}
	var term ackerr.TerminalError
	if errors.As(err, &term) {
		return ctrlrt.Result{}, nil
	}
	return ctrlrt.Result{}, err
}
func ( r * fieldExportReconciler ) handleReconcileError ( err error ) ( ctrlrt . Result , error ) { if err == nil || err == ackerr . Terminal { return ctrlrt . Result { } , nil } var requeueNeededAfter * requeue . RequeueNeededAfter if errors . As ( err , & requeueNeededAfter ) { after := requeueNeededAfter . Duration ( ) r . log . V ( 1 ) . Info ( " " , " " , requeueNeededAfter . Unwrap ( ) , " " , after , ) return ctrlrt . Result { RequeueAfter : after } , nil } var requeueNeeded * requeue . RequeueNeeded if errors . As ( err , & requeueNeeded ) { r . log . V ( 1 ) . Info ( " " , " " , requeueNeeded . Unwrap ( ) , ) return ctrlrt . Result { Requeue : true } , nil } var noRequeue * requeue . NoRequeue if errors . As ( err , & noRequeue ) { r . log . V ( 1 ) . Info ( " " , " " , noRequeue . Error ( ) , ) return ctrlrt . Result { } , nil } var term ackerr . TerminalError if errors . As ( err , & term ) { return ctrlrt . Result { } , nil } return ctrlrt . Result { } , err }
handleReconcileError will handle errors from reconcile handlers, which
respects runtime errors.
handleReconcileError will handle errors from reconcile handlers which respects runtime errors .