Skip to content

Commit 1ed9c9f

Browse files
committed
ignore handled errors when creating spaces (cs3org#2439)
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
1 parent 8a956f3 commit 1ed9c9f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Diff for: changelog/unreleased/ignore-known-erros.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Enhancement: ignore handled errors when creating spaces
2+
3+
The CreateStorageSpace no longer logs all error cases with error level logging
4+
5+
https://github.com/cs3org/reva/pull/2439

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -507,13 +507,13 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt
507507
st = status.NewAlreadyExists(ctx, err, "already exists")
508508
default:
509509
st = status.NewInternal(ctx, "error listing spaces")
510+
appctx.GetLogger(ctx).
511+
Error().
512+
Err(err).
513+
Interface("status", st).
514+
Interface("request", req).
515+
Msg("failed to create storage space")
510516
}
511-
appctx.GetLogger(ctx).
512-
Error().
513-
Err(err).
514-
Interface("status", st).
515-
Interface("request", req).
516-
Msg("failed to create storage space")
517517
return &provider.CreateStorageSpaceResponse{
518518
Status: st,
519519
}, nil

0 commit comments

Comments
 (0)