as you see in the topic. What is the REST standard on a delete request if the resource is not found and how to check this?
router.route('/tasks/:id').delete((req, res) => {
    Task.findByIdAndRemove(req.params.id)
        .then(() => {
            // REST Response for deleting content
            res.status(204);
            res.send('');
        })
        .catch(err => {
            res.status(404);
            res.send(err);
        });
});
At this example I can't get the 404 and I don't know why.
 
    