Do not ignore errors
This commit is contained in:
@ -45,7 +45,9 @@ func (c *Cache) getEventID(userID string) string {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
_ = c.loadCache()
|
||||
if err := c.loadCache(); err != nil {
|
||||
log.WithError(err).Warn("Problem to load store cache")
|
||||
}
|
||||
|
||||
if c.cache == nil {
|
||||
c.cache = map[string]map[string]string{}
|
||||
|
||||
@ -41,7 +41,7 @@ type Mailbox struct {
|
||||
}
|
||||
|
||||
func newMailbox(storeAddress *Address, labelID, labelPrefix, labelName, color string) (mb *Mailbox, err error) {
|
||||
_ = storeAddress.store.db.Update(func(tx *bolt.Tx) error {
|
||||
err = storeAddress.store.db.Update(func(tx *bolt.Tx) error {
|
||||
mb, err = txNewMailbox(tx, storeAddress, labelID, labelPrefix, labelName, color)
|
||||
return err
|
||||
})
|
||||
|
||||
@ -129,6 +129,9 @@ func (storeMailbox *Mailbox) MarkMessagesRead(apiIDs []string) error {
|
||||
ids = append(ids, apiID)
|
||||
}
|
||||
}
|
||||
if len(ids) == 0 {
|
||||
return nil
|
||||
}
|
||||
return storeMailbox.client().MarkMessagesRead(ids)
|
||||
}
|
||||
|
||||
|
||||
@ -218,7 +218,9 @@ func (store *Store) deleteMailboxEvent(labelID string) error {
|
||||
store.lock.Lock()
|
||||
defer store.lock.Unlock()
|
||||
|
||||
_ = store.removeMailboxCount(labelID)
|
||||
if err := store.removeMailboxCount(labelID); err != nil {
|
||||
log.WithError(err).Warn("Problem to remove mailbox counts while deleting mailbox")
|
||||
}
|
||||
|
||||
for _, a := range store.addresses {
|
||||
if err := a.deleteMailboxEvent(labelID); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user