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

The DeleteStorageSpace method response code has been changed #3848

Closed
wants to merge 0 commits into from

Conversation

2403905
Copy link

@2403905 2403905 commented May 4, 2023

The DeleteStorageSpace method response status has been changed to 'not found' if no one spaces in a list or errtypes.IsNotFound. That allows us to handle the status properly. Related to owncloud/ocis#5031

@update-docs
Copy link

update-docs bot commented May 4, 2023

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.

@2403905 2403905 marked this pull request as ready for review May 5, 2023 07:17
@2403905 2403905 requested review from labkode, ishank011, glpatcern and a team as code owners May 5, 2023 07:17
changelog/unreleased/fix-response-code.md Outdated Show resolved Hide resolved
internal/grpc/services/storageprovider/storageprovider.go Outdated Show resolved Hide resolved
internal/grpc/services/storageprovider/storageprovider.go Outdated Show resolved Hide resolved
@@ -609,6 +611,10 @@ func (s *service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteSt
return &provider.DeleteStorageSpaceResponse{
Status: st,
}, nil
} else if len(spaces) != 1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else if len(spaces) != 1 {
} else if len(spaces) == 1 {

If we need to handle len(spaces) > 1 we should a separate case for it.

@2403905 2403905 requested a review from kobergj May 8, 2023 11:24
@2403905 2403905 closed this May 8, 2023
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.

3 participants