ReferenceAPI referenceagentspartykernelerrors

ProjectionError

A role's endpoint protocol cannot be derived from a global protocol.

str(error) is the full recipe — how the shape is broken and what to change — and .role / .where / .recipe carry the same diagnosis in fields, so a UI can present it without parsing the text.

Functions

func__init__(self, message, *, role=None, where=None, recipe=None) -> None

Record message and the structured diagnosis, if known.

› Source code
def __init__(
    self,
    message: str,
    *,
    role: Role | None = None,
    where: str | None = None,
    recipe: str | None = None,
) -> None:
    """Record *message* and the structured diagnosis, if known.

    Args:
        message: The full recipe, as it is raised today.
        role: The role the projection failed for, when known.
        where: The protocol node the failure is about, when known.
        recipe: The fix a UI should show; defaults to *message*.
    """
    super().__init__(message)
    self.role = role
    self.where = where
    self.recipe = message if recipe is None else recipe
parammessagestr

The full recipe, as it is raised today.

paramroleRole | None
= None

The role the projection failed for, when known.

paramwherestr | None
= None

The protocol node the failure is about, when known.

paramrecipestr | None
= None

The fix a UI should show; defaults to message.

Returns

None

On this page