Skip to content

Commit

Permalink
Add current and received session ID to error during receive
Browse files Browse the repository at this point in the history
  • Loading branch information
artemskriabin committed Mar 5, 2024
1 parent 48601a4 commit f27e19a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/core/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package core
import (
"context"
goerr "errors"
"gitlab.com/distributed_lab/logan/v3"
"gitlab.com/distributed_lab/logan/v3/errors"
"sync"

"github.com/rarimo/tss-svc/pkg/types"
Expand Down Expand Up @@ -51,7 +53,10 @@ func (s *SessionManager) Receive(ctx context.Context, request *types.MsgSubmitRe
return session.Receive(ctx, request)
}

return ErrInvalidSessionID
return errors.From(ErrInvalidSessionID, logan.F{
"current_id": session.ID(),
"received_id": request.Data.Id,
})
}

return ErrInvalidSessionType
Expand Down

0 comments on commit f27e19a

Please sign in to comment.