Raising an error in case the token is not provided and returning the data from the call in get_data method.