actions.indexNotFound(req, res, collection, index, headers)
The function generates an error response.