- integrations
- Python
- ocx_sdk
OcxProcessError, OcxTimeoutError
OcxProcessErrorclass#
Re-exported from
ocx_sdk._errorsView sourceclass OcxProcessError(exit_code: int, argv: Sequence[str], stderr: str = '', *, attempts: int = 1, stdout: str = '')Bases: OcxExecutionError
An ocx process exited non-zero.
Attributes
| Name | Type | Description |
|---|---|---|
exit_code | int | The exit status. int rather than ExitCode because a
process killed by a signal exits with a code ocx never assigns,
and building an error must not itself raise. |
attempts | int | Attempts made; greater than 1 when a retry policy was
active. _retry sets it on the final failure. |
stdout | str | Captured stdout in full, verbatim. Never read by _summary()
or __str__ — that is the entire point: a partial-failure report
on stdout can carry data that must not reach a log through the
exception message. Never redacted either, unlike stderr —
substituting inside it would corrupt the JSON a caller is about
to parse. Read it through partial_report(err), which is the
sanctioned consumer; never hand the raw error or this attribute
to a log sink, to a logger that serializes __dict__, or to a
pickle crossing into a lower-trust process. |
attemptsattributeinstance attribute#
attempts: int = attemptsexit_codeattributeinstance attribute#
exit_code: int = exit_codestdoutattributeinstance attribute#
stdout: str = stdoutretryableproperty#
retryable: boolWhether ocx called this failure transient (exit 75).
Fixed semantics, independent of any RetryPolicy: this reports what
ocx said about the failure, not whether a caller chose to retry it.
OcxTimeoutErrorclass#
Re-exported from
ocx_sdk._errorsView sourceclass OcxTimeoutError(timeout: float, argv: Sequence[str], stderr: str = '')Bases: OcxExecutionError
ocx did not finish within the timeout and the child was terminated.
Attributes
| Name | Type | Description |
|---|---|---|
timeout | float | The per-attempt budget, in seconds, that expired. |
argv | tuple[str, ...] | The argv that ran. |
stderr | str | Whatever stderr was captured before the child was killed. |
timeoutattributeinstance attribute#
timeout: float = timeout