Exceptions

The exception classes Waymark raises out of the SDK. You'll hit these at registration time, at the call site of workflow.run(...), or when managing schedules.

Unsupported patterns

Raised at registration when the compiler hits something in your run() body it can't lower to IR. This is the exception you'll see most while authoring: it carries the offending pattern, the source line, and a recommendation for how to restructure. See Control Flow for the full list of supported and rejected patterns.

CLASSwaymark.ir_builder.UnsupportedPatternError

Raised when the IR builder encounters an unsupported Python pattern.

This error includes a recommendation for how to rewrite the code to use supported patterns.

Class Constructor

  • Name
    message
    Type
    str
    Description
  • Name
    recommendation
    Type
    str
    Description
  • Name
    line
    Type
    Optional[int]
    Description

    Default: None

  • Name
    col
    Type
    Optional[int]
    Description

    Default: None

  • Name
    filename
    Type
    Optional[str]
    Description

    Default: None


Workflow failure

A workflow whose action fails without a matching retry or try/except fails as a whole. The await workflow.run(...) call raises a RuntimeError carrying the failure detail. Handle expected failures inside the workflow with try/except; treat a RuntimeError at the call site as the unexpected case.

Retry exhaustion

Defined for retry-budget exhaustion. Today, exhausting a RetryPolicy surfaces the action's own final exception through the workflow rather than raising this class; catch the underlying exception type in your workflow try/except.

CLASSwaymark.exceptions.ExhaustedRetriesError

Raised when an action exhausts its allotted retry attempts.

Class Constructor

  • Name
    message
    Type
    str | None
    Description

    Default: None


Schedule conflicts

Raised by schedule_workflow(...) when the bridge reports a conflicting schedule for the same (workflow_name, schedule_name). In the common path, re-registering an existing schedule updates it in place; see Scheduled Workflows.

CLASSwaymark.exceptions.ScheduleAlreadyExistsError

Raised when a schedule name is already registered.

Class Constructor

  • Name
    message
    Type
    str | None
    Description

    Default: None