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

This commit is contained in:
Willy Kloucek committed 2022-07-19 13:58:39 +02:00
1 parent 8af6fcf69d
commit 8312803c16
2 files changed
+8 -1

No files matched your search

@@ -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
+1 -1
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