if not isinstance(exc_type, APIError):

(In case we ever decide to extend APIError.)