-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ipfs pin ls - ignore pins that have errors #7612
Conversation
Shouldn't we be returning the error? |
core/commands/pin.go
Outdated
@@ -499,6 +499,9 @@ func pinLsAll(req *cmds.Request, typeStr string, api coreiface.CoreAPI, emit fun | |||
} | |||
|
|||
for p := range pins { | |||
if p.Err() != nil { | |||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Stebalien we could return errors but it doesn't look like we have anything to handle those. No idea if anything upstream it's prepared to actually handle the errors.
This might be easier to sneak into the RC since there won't be any surprises, just fewer issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant, we could just return an error and abort. IIRC, we'll only get one error anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like it should work
1442599
to
d2c310f
Compare
if p.Err() != nil { | ||
return err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Stebalien Is this what you were looking for?
Also relevant ipfs/interface-go-ipfs-core#62. |
d2c310f
to
178f581
Compare
178f581
to
6871e6d
Compare
No description provided.