Skip to content

Commit def192f

Browse files
committed
[push] Do not return 500 on deletion of a non-existent message
1 parent 6f09151 commit def192f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/push/api/parts/endpoints.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ function cachedData(note) {
12071207
return common.returnMessage(params, 403, 'Only app / global admins are allowed to delete');
12081208
}
12091209

1210-
await note.update(common.db, {$bit: {'result.status': {or: N.Status.Deleted}}});
1210+
await note.update(common.db, {$bit: {'result.status': {or: N.Status.Deleted}}}).catch(log.w.bind(log, 'Error during message deletion'));
12111211
api.cache.remove(_id);
12121212
note.result.status |= N.Status.Deleted;
12131213

0 commit comments

Comments
 (0)