diff --git a/internal/session/handle.go b/internal/session/handle.go index 6935fc03..0a3a3ec9 100644 --- a/internal/session/handle.go +++ b/internal/session/handle.go @@ -3,6 +3,7 @@ package session import ( "context" "fmt" + "github.com/sirupsen/logrus" "github.com/ProtonMail/gluon/imap/command" "github.com/ProtonMail/gluon/internal/response" @@ -22,6 +23,7 @@ func (s *Session) handleOther( defer close(resCh) if err := s.handleCommand(ctx, tag, cmd, resCh); err != nil { + logrus.WithError(err).WithField("cmd", cmd.SanitizedString()).Error("Command failed") if res, ok := response.FromError(err); ok { resCh <- res } else {