GMXAPIUnavailable

Documentation for eth_defi.gmx.retry.GMXAPIUnavailable exception.

exception GMXAPIUnavailable

Bases: RuntimeError

Raised when every GMX API endpoint fails for a request.

Carries a per-endpoint attempt summary so callers and logs can distinguish “GMX is down” from “you asked for something that does not exist”. Subclasses RuntimeError so existing except RuntimeError handlers keep working.

Initialise the exception.

Parameters
  • chain – Chain name the request was for.

  • endpoint – API endpoint that failed (e.g. "/prices/tickers").

  • attempts – Per-endpoint failure summaries collected during failover.

__init__(chain, endpoint, attempts)

Initialise the exception.

Parameters
  • chain (str) – Chain name the request was for.

  • endpoint (str) – API endpoint that failed (e.g. "/prices/tickers").

  • attempts (Union[tuple[str, ...], list[str]]) – Per-endpoint failure summaries collected during failover.

Return type

None

attempts: tuple[str, ...]

Human-readable summary of each endpoint tried and why it failed.

__new__(**kwargs)
add_note(note, /)

Add a note to the exception

with_traceback(tb, /)

Set self.__traceback__ to tb and return self.