Skip to content

fix: ipfs pin ls - ignore pins that have errors#7612

Merged
aschmahmann merged 1 commit intomasterfrom
fix/pin-ls-errors
Aug 25, 2020
Merged

fix: ipfs pin ls - ignore pins that have errors#7612
aschmahmann merged 1 commit intomasterfrom
fix/pin-ls-errors

Conversation

@aschmahmann
Copy link
Contributor

No description provided.

@aschmahmann aschmahmann requested a review from Stebalien August 20, 2020 19:40
@Stebalien
Copy link
Member

Shouldn't we be returning the error?


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