improve error log for "could not get user by claim" error

This commit is contained in:
Willy Kloucek
2022-07-19 13:57:53 +02:00
parent 8af6fcf69d
commit 8312803c16
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
Enhancement: Improve error log for "could not get user by claim" error
We've improved the error log for "could not get user by claim" error where
previously only the "nil" error has been logged. Now we're logging the
message from the transport.
https://github.com/owncloud/ocis/pull/4227

View File

@@ -65,7 +65,7 @@ func (c *cs3backend) GetUserByClaims(ctx context.Context, claim, value string, w
if res.Status.Code == rpcv1beta1.Code_CODE_NOT_FOUND {
return nil, "", ErrAccountNotFound
}
return nil, "", fmt.Errorf("could not get user by claim %v with value %v : %w ", claim, value, err)
return nil, "", fmt.Errorf("could not get user by claim %v with value %v : %s ", claim, value, res.Status.Message)
}
user := res.User