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

Ignore Stray Public Shares #1090

Merged
merged 3 commits into from
Aug 13, 2020
Merged

Ignore Stray Public Shares #1090

merged 3 commits into from
Aug 13, 2020

Conversation

refs
Copy link
Member

@refs refs commented Aug 13, 2020

context: #1087. Closes #1087

Separated from #1064 to keep changes atomic.

@update-docs
Copy link

update-docs bot commented Aug 13, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

if err != nil {
return nil, err
if statResponse.Status.Code != rpc.Code_CODE_OK {
if statResponse.Status.Code == rpc.Code_CODE_NOT_FOUND {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is status code is neither or nor not found, should still return nil, err, might need to format that error

@@ -1162,14 +1162,14 @@ func (h *Handler) listPublicShares(r *http.Request, filters []*link.ListPublicSh
}

statResponse, err := c.Stat(ctx, statRequest)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep detecting grpc call errors and returning nil, err

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree 👍

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@refs refs marked this pull request as ready for review August 13, 2020 14:51
@refs refs requested a review from labkode as a code owner August 13, 2020 14:51
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.

Fix error handling on the PublicShare manager
3 participants