Skip to content

ECNClientError

Part of Exceptions in the Python API reference.

Related guidance: reference/exceptions, how-to/troubleshooting.

Runnable examples: preflight.py.

from picogrid_ecn_client import ECNClientError

Base exception for all failures crossing the public client boundary.

class ECNClientError(Exception): ...

Source · exceptions.py

Hierarchy: ECNClientError

Initialize a redacted public client error.

def __init__(
message: object,
*,
code: str | None = None,
operation: str | None = None,
status_code: int | None = None,
details: Mapping[str, object] | None = None,
secrets: tuple[str, ...] = (),
) -> None
NameTypeDefaultDescription
messageobjectFailure message to redact and expose.
codestr | NoneNoneOptional stable error code overriding :attr:default_code.
operationstr | NoneNoneOptional client operation that failed.
status_codeint | NoneNoneOptional status value associated with the failure.
detailsMapping[str, object] | NoneNoneOptional detail values copied and redacted into strings.
secretstuple[str, …]()Additional exact values to remove from public text.

Source · exceptions.py

Redacted human-readable failure message.

message: str

Source · exceptions.py

Stable machine-readable failure code.

code: str

Source · exceptions.py

Client operation that failed, when identified.

operation: str | None

Source · exceptions.py

Status value associated with the failure, when available.

status_code: int | None

Source · exceptions.py

Secret-safe string details associated with the failure.

details: dict[str, str]

Source · exceptions.py

Stable fallback code used when an instance does not provide one.

default_code: str

Source · exceptions.py

Version 0.2.0 · branch main