Skip to content

Commit

Permalink
Improved logging on createHome
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Nov 25, 2024
1 parent c71d70c commit 15b7706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/unreleased/log-home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Enhancement: improved logging on createHome

https://github.com/cs3org/reva/pull/4970
3 changes: 2 additions & 1 deletion internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ func (s *svc) CreateHome(ctx context.Context, req *provider.CreateHomeRequest) (
home := s.getHome(ctx)
c, err := s.findByPath(ctx, home)
if err != nil {
log.Err(err).Str("home", home).Msg("gateway: error finding home on storage provider")
return &provider.CreateHomeResponse{
Status: status.NewStatusFromErrType(ctx, "error finding home", err),
}, nil
}

res, err := c.CreateHome(ctx, req)
if err != nil {
log.Err(err).Msg("gateway: error creating home on storage provider")
log.Err(err).Str("home", home).Msg("gateway: error creating home on storage provider")
return &provider.CreateHomeResponse{
Status: status.NewInternal(ctx, err, "error calling CreateHome"),
}, nil
Expand Down

0 comments on commit 15b7706

Please sign in to comment.