fix: don't log errors caused by empty SELECT
This commit is contained in:
@ -136,7 +136,16 @@ func (iu *imapUser) GetMailbox(name string) (mb goIMAPBackend.Mailbox, err error
|
|||||||
|
|
||||||
storeMailbox, err := iu.storeAddress.GetMailbox(name)
|
storeMailbox, err := iu.storeAddress.GetMailbox(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithField("name", name).WithError(err).Error("Could not get mailbox")
|
logMsg := log.WithField("name", name).WithError(err)
|
||||||
|
|
||||||
|
// GODT-97: some clients perform SELECT "" in order to unselect.
|
||||||
|
// We don't want to fill the logs with errors in this case.
|
||||||
|
if name != "" {
|
||||||
|
logMsg.Error("Could not get mailbox")
|
||||||
|
} else {
|
||||||
|
logMsg.Debug("Failed attempt to get mailbox with empty name")
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
* GODT-97 Don't log errors caused by SELECT "".
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* GODT-979 Fix panic when trying to parse a multipart/alternative section that has no child sections.
|
* GODT-979 Fix panic when trying to parse a multipart/alternative section that has no child sections.
|
||||||
|
|||||||
Reference in New Issue
Block a user