diff --git a/changelog/unreleased/fix-drive-response.md b/changelog/unreleased/fix-drive-response.md new file mode 100644 index 0000000000..5f5a3a549b --- /dev/null +++ b/changelog/unreleased/fix-drive-response.md @@ -0,0 +1,5 @@ +Bugfix: Handle the bad request status + +Handle the bad request status for the CreateStorageSpace function + +https://github.com/cs3org/reva/pull/3948 diff --git a/internal/grpc/services/storageprovider/storageprovider.go b/internal/grpc/services/storageprovider/storageprovider.go index 9748db5cc6..e08aff6bdb 100644 --- a/internal/grpc/services/storageprovider/storageprovider.go +++ b/internal/grpc/services/storageprovider/storageprovider.go @@ -499,6 +499,8 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt } case errtypes.AlreadyExists: st = status.NewAlreadyExists(ctx, err, "already exists") + case errtypes.BadRequest: + st = status.NewInvalid(ctx, err.Error()) default: st = status.NewInternal(ctx, "error creating space") appctx.GetLogger(ctx).