GitHub

HttpClientError

API reference for HttpClientError.

An HTTP client failed; reason says how. The reason's cause is this error's cause too (Python's __cause__).

Attributes

AttributeTypeDescription
reasonHttpClientErrorReason
causeobject = field(default=None, init=False, repr=False, compare=False)
requestHttpClientRequest
responseHttpClientResponse | None
messagestr

Functions

__init__

__init__(reason) -> None
ParameterTypeDescription
reasonHttpClientErrorReason

to_json

to_json() -> dict[str, object]

Returns dict[str, object]

def to_json(self) -> dict[str, object]:
    return {"_tag": "HttpClientError", "reason": self.reason.to_json()}