Raise an error if a slug is not provided