Skip to content

Commit 53037a0

Browse files
committed
fix create space error message (cs3org#2452)
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
1 parent bb960af commit 53037a0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: changelog/unreleased/fix-create-space-error-msg.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bugfix: fix create space error message
2+
3+
Create space no longer errors with list spaces error messages.
4+
5+
https://github.com/cs3org/reva/pull/2452

Diff for: internal/grpc/services/storageprovider/storageprovider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt
488488
var st *rpc.Status
489489
switch err.(type) {
490490
case errtypes.IsNotFound:
491-
st = status.NewNotFound(ctx, "not found when listing spaces")
491+
st = status.NewNotFound(ctx, "not found when creating space")
492492
case errtypes.PermissionDenied:
493493
st = status.NewPermissionDenied(ctx, err, "permission denied")
494494
case errtypes.NotSupported:
@@ -506,7 +506,7 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt
506506
case errtypes.AlreadyExists:
507507
st = status.NewAlreadyExists(ctx, err, "already exists")
508508
default:
509-
st = status.NewInternal(ctx, "error listing spaces")
509+
st = status.NewInternal(ctx, "error creating space")
510510
appctx.GetLogger(ctx).
511511
Error().
512512
Err(err).

0 commit comments

Comments
 (0)