fixed error wrap

This commit is contained in:
crn4 2025-06-16 13:31:01 +02:00
parent 6cd77cc17c
commit c332ff0a47

View File

@ -139,12 +139,12 @@ func (s *GRPCServer) Sync(req *proto.EncryptedMessage, srv proto.ManagementServi
syncReq := &proto.SyncRequest{}
peerKey, err := s.parseRequest(ctx, req, syncReq)
if err != nil {
return mapError(ctx, err)
return err
}
peerMeta := extractPeerMeta(ctx, syncReq.GetMeta())
metahashed := metaHash(peerMeta)
if !s.accountManager.AllowSync(peerKey.String(), metahashed) {
return internalStatus.ErrPeerAlreadyLoggedIn
return mapError(ctx, internalStatus.ErrPeerAlreadyLoggedIn)
}
// nolint:staticcheck