From 4169b08b5345554de7f708c2405147e979ef0524 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 27 Dec 2023 14:32:25 +0100 Subject: [PATCH] chore: Log command errors --- internal/session/handle.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/session/handle.go b/internal/session/handle.go index 6935fc03..5c30e23f 100644 --- a/internal/session/handle.go +++ b/internal/session/handle.go @@ -8,6 +8,7 @@ import ( "github.com/ProtonMail/gluon/internal/response" "github.com/ProtonMail/gluon/internal/state" "github.com/ProtonMail/gluon/logging" + "github.com/sirupsen/logrus" ) func (s *Session) handleOther( @@ -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 {