Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

fix:error should be handled#1334

Merged
pjuarezd merged 1 commit intominio:masterfrom
jiuker:patch-1
Nov 1, 2022
Merged

fix:error should be handled#1334
pjuarezd merged 1 commit intominio:masterfrom
jiuker:patch-1

Conversation

@jiuker
Copy link
Copy Markdown
Contributor

@jiuker jiuker commented Nov 1, 2022

If it is a network error, nil should not be returned here.

tenant, err := c.minioClientSet.MinioV2().Tenants(namespace).Get(context.Background(), tenantName, metav1.GetOptions{})
	if err != nil {
		// The Tenant resource may no longer exist, in which case we stop processing.
		if k8serrors.IsNotFound(err) {
 			runtime.HandleError(fmt.Errorf("Tenant '%s' in work queue no longer exists", key))
 			return nil
 		}
- 		return nil
+		return err
 	}

If it is a network error, nil should not be returned here
@pjuarezd pjuarezd merged commit b41e1b3 into minio:master Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants