Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions sdks/python/pmxt/_hosted_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ def __init__(self, status: int | str, detail: str | None = None) -> None:
self.status = status_value
self.detail = detail_value
retryable = (
self.DEFAULT_RETRYABLE
if self.DEFAULT_RETRYABLE is not None
else status_value >= 500
self.DEFAULT_RETRYABLE if self.DEFAULT_RETRYABLE is not None else status_value >= 500
)
super().__init__(detail_value, code=self.DEFAULT_CODE, retryable=retryable)

Expand Down Expand Up @@ -148,8 +146,6 @@ def _matches_no_liquidity(detail: str) -> bool:
(None, _matches_no_liquidity, NoLiquidity),
]

ERROR_PATTERN_TABLE = HOSTED_ERROR_PATTERNS


def raise_from_response(response: httpx.Response) -> None:
"""Raise the hosted trading exception matching an upstream HTTP response."""
Expand Down