analytics-python
analytics-python copied to clipboard
Invalid base class for APIError
We have a business logic which sends some events. In order to trigger retry logic on errors we catch some errors there e.g. requests.exceptions.ConnectionError and analytics.request.APIError.
When APIError raises we get a TypeError with the following message 'catching classes that do not inherit from BaseException is not allowed'. I suppose it's due to APIError has Exception as a parent class and it should be replaced with BaseException.
Probably APIError can be inherited from Exception but it might be helpful to call super().__init__() inside it's constructor.