Helper function for sending proper 404 error.