throw exception if api fails to get text