Use specific values in message about address mismatch #1431

Merged
acid-ant merged 1 commit from potyarkin/frostfs-node:feature/better-error-message into master 2024-10-15 08:01:24 +00:00

View file

@ -86,7 +86,7 @@ func newTrustedTarget(prm *objectwriter.Params) (transformer.ChunkedObjectWriter
user.IDFromKey(&ownerSession, key.PublicKey) user.IDFromKey(&ownerSession, key.PublicKey)
if !ownerObj.Equals(ownerSession) { if !ownerObj.Equals(ownerSession) {
return nil, errors.New("session token is missing but object owner id is different from the default key") return nil, fmt.Errorf("session token is missing but object owner id (%s) is different from the default key (%s)", ownerObj, ownerSession)
} }
} else { } else {
if !ownerObj.Equals(sessionInfo.Owner) { if !ownerObj.Equals(sessionInfo.Owner) {