webmail: when trying to empty an already empty mailbox, make it a user error, not server error

server errors could cause error logging.
This commit is contained in:
Mechiel Lukkien 2025-02-22 23:11:34 +01:00
parent 9f3cb7340b
commit cad585a70e
No known key found for this signature in database

View File

@ -1303,7 +1303,7 @@ func (Webmail) MailboxEmpty(ctx context.Context, mailboxID int64) {
xcheckf(ctx, err, "deleting messages")
if n == 0 {
xcheckf(ctx, errors.New("no messages in mailbox"), "emptying mailbox")
xcheckuserf(ctx, errors.New("no messages in mailbox"), "emptying mailbox")
}
mb.ModSeq = modseq