Do not return an error on mailinglist listing if none exists
We usually return the empty array, to avoid the need for specific error handling
This commit is contained in:
@@ -146,7 +146,6 @@ function listGroups(domain, callback) {
|
||||
|
||||
database.query('SELECT ' + MAILBOX_FIELDS + ' FROM mailboxes WHERE domain = ? AND ownerType = ? AND aliasTarget IS NULL', [ domain, exports.TYPE_GROUP ], function (error, results) {
|
||||
if (error) return callback(new DatabaseError(DatabaseError.INTERNAL_ERROR, error));
|
||||
if (results.length === 0) return callback(new DatabaseError(DatabaseError.NOT_FOUND));
|
||||
|
||||
callback(null, results);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user