Module adcp.reporting.ledger.row_storage_errors

Stable, secret-free row-storage failures.

Classes

class ReportingRowBindingMismatchError
Expand source code
class ReportingRowBindingMismatchError(ReportingRowStoreError):
    """The rows do not reproduce the committed binding they were prepared against.

    An ``INVALID_INPUT`` that callers can tell apart by type instead of by reading its message.
    """

    def __init__(self) -> None:
        super().__init__("INVALID_INPUT", "rows do not reproduce their committed binding")

The rows do not reproduce the committed binding they were prepared against.

An INVALID_INPUT that callers can tell apart by type instead of by reading its message.

Ancestors

class ReportingRowStoreError (code: ReportingRowStoreErrorCode, detail: str | None = None)
Expand source code
class ReportingRowStoreError(RuntimeError):
    """A stable, secret-free row-storage failure. Switch on :attr:`code`.

    Operator codes are never buyer-facing: callers collapse them before a wire
    response so a buyer cannot probe whether an object exists. Raw provider
    errors are never surfaced.
    """

    def __init__(self, code: ReportingRowStoreErrorCode, detail: str | None = None) -> None:
        super().__init__(
            f"Reporting row store: {code}: {detail}" if detail else f"Reporting row store: {code}"
        )
        self.code: ReportingRowStoreErrorCode = code
        self.detail = detail

A stable, secret-free row-storage failure. Switch on :attr:code.

Operator codes are never buyer-facing: callers collapse them before a wire response so a buyer cannot probe whether an object exists. Raw provider errors are never surfaced.

Ancestors

  • builtins.RuntimeError
  • builtins.Exception
  • builtins.BaseException

Subclasses