Do not ignore errors

This commit is contained in:
Michal Horejsek
2020-09-03 14:36:12 +02:00
parent 9218598140
commit bb1d27a5be
9 changed files with 63 additions and 22 deletions

View File

@ -80,7 +80,7 @@ func (ib *imapBackend) removeFromCache(userID, label, toRemove string) {
func (ib *imapBackend) getCacheList(userID, label string) (list string) {
if err := ib.loadIMAPCache(); err != nil {
log.Warn("Could not load cache: ", err)
log.WithError(err).Warn("Could not load cache")
}
ib.imapCacheLock.Lock()
@ -97,7 +97,9 @@ func (ib *imapBackend) getCacheList(userID, label string) (list string) {
ib.imapCacheLock.Unlock()
_ = ib.saveIMAPCache()
if err := ib.saveIMAPCache(); err != nil {
log.WithError(err).Warn("Could not save cache")
}
return
}