Skip to content

AllStreamOperationsFailedError

Class: warmhub.AllStreamOperationsFailedError

AllStreamOperationsFailedError(result: Mapping[str, Any], *, receipts: Sequence[OperationEventReceipt] = ())

The stream append completed deterministically but every operation failed.

NOT a WarmHubError — see the module docstring.

result is the wire mapping, matching TypeScript’s constructor, but operations is decoded into SubmittedOperation models. Handing back raw mappings would make op.submitted_name and op.error.code — the two things a caller reads on this path — fail with AttributeError, which is exactly what the quickstart does.

Cause. Raised when the append reached the server and every operation in it was rejected. The request itself succeeded; its contents did not.

Retryability. Not retryable as a whole. The outcome is deterministic, so resending the same operations produces the same failures.

Corrective action. code is the shared per-op code when all diagnostics agree, or STREAM_ALL_OPERATIONS_FAILED for mixed codes. Inspect operations for each code and message before resubmitting.

Difference from TypeScript. A v1 receipt row’s singular error is read exactly as TypeScript reads it. Elsewhere (v2 rows, and rows passed to this constructor directly) a row whose errors is empty or absent falls back to its singular error here, while TypeScript reads only errors. So for rows like {"status": "error", "errors": [], "error": {"code": "RATE_LIMITED", ...}} this error’s code is RATE_LIMITED and its message names that failure, where TypeScript reports STREAM_ALL_OPERATIONS_FAILED.

name = 'WarmHubError'

Mirrors TypeScript. See the note on name.

message = message

Documentation is not yet available.

code = primary_failure.code if primary_failure is not None and all((operation.status == 'error' and operation.errors and all((error.code == primary_failure.code) for error in (operation.errors))) for operation in operations) else 'STREAM_ALL_OPERATIONS_FAILED'

Documentation is not yet available.

result = result

Documentation is not yet available.

receipts = tuple(receipts)

Documentation is not yet available.

operations = operations

Documentation is not yet available.

cause = primary_failure.raw if primary_failure is not None else None

Documentation is not yet available.

status_counts = StreamStatusCounts(applied=(_count(typed, 'applied')), noop=(_count(typed, 'noop')), error=(_count(typed, 'error')))

Documentation is not yet available.