Skip to content
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

Merged
merged 1 commit into from
Aug 25, 2020

Conversation

aschmahmann
Copy link
Contributor

No description provided.

@Stebalien
Copy link
Member

Shouldn't we be returning the error?

@@ -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
Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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

Comment on lines +502 to +504
if p.Err() != nil {
return err
}
Copy link
Contributor Author

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?

@Stebalien
Copy link
Member

Also relevant ipfs/interface-go-ipfs-core#62.

@aschmahmann aschmahmann merged commit 5f4cb4f into master Aug 25, 2020
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
@hacdias hacdias deleted the fix/pin-ls-errors branch May 9, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants