An HTTP client failed; reason says how. The reason's cause is
this error's cause too (Python's __cause__).
Attributes#
| Attribute | Type | Description |
|---|---|---|
reason | HttpClientErrorReason | |
cause | object = field(default=None, init=False, repr=False, compare=False) | |
request | HttpClientRequest | |
response | HttpClientResponse | None | |
message | str |
Functions#
__init__#
__init__(reason) -> None| Parameter | Type | Description |
|---|---|---|
reason | HttpClientErrorReason |
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()}