b24api 0.7.2__tar.gz → 0.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {b24api-0.7.2/b24api.egg-info → b24api-0.7.4}/PKG-INFO +1 -1
- {b24api-0.7.2 → b24api-0.7.4}/b24api/base_api.py +4 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/entity.py +7 -2
- {b24api-0.7.2 → b24api-0.7.4/b24api.egg-info}/PKG-INFO +1 -1
- {b24api-0.7.2 → b24api-0.7.4}/LICENSE +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/MANIFEST.in +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/README.md +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/__init__.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/async_api.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/error.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/query.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/settings.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/sync_api.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api/type.py +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api.egg-info/SOURCES.txt +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api.egg-info/dependency_links.txt +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api.egg-info/requires.txt +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/b24api.egg-info/top_level.txt +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/pyproject.toml +0 -0
- {b24api-0.7.2 → b24api-0.7.4}/setup.cfg +0 -0
|
@@ -57,6 +57,10 @@ class BaseBitrix24(ABC):
|
|
|
57
57
|
def _retry() -> type[Retrying | AsyncRetrying]:
|
|
58
58
|
pass
|
|
59
59
|
|
|
60
|
+
@property
|
|
61
|
+
def host(self) -> str:
|
|
62
|
+
return self.settings.webhook_url.host
|
|
63
|
+
|
|
60
64
|
def _validate_call_response(self, request: Request, response: httpx.Response) -> Response:
|
|
61
65
|
# Checking more informative errors first (content may exist with 5xx status)
|
|
62
66
|
with contextlib.suppress(httpx.ResponseNotRead, ValidationError):
|
|
@@ -61,9 +61,14 @@ class ErrorResponse(BaseModel):
|
|
|
61
61
|
|
|
62
62
|
def raise_error(self, request: Request, settings: Settings) -> None:
|
|
63
63
|
logger = logging.getLogger(settings.logger_name)
|
|
64
|
-
logger.debug("Request: %s", request)
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
if self.error in settings.retry_errors:
|
|
66
|
+
logger.debug("Request: %s", request)
|
|
67
|
+
error_cls = RetryApiResponseError
|
|
68
|
+
else:
|
|
69
|
+
logger.warning("Request: %s", request)
|
|
70
|
+
error_cls = ApiResponseError
|
|
71
|
+
|
|
67
72
|
raise error_cls(
|
|
68
73
|
code=self.error,
|
|
69
74
|
description=self.error_description,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|