API reference@evolu/commonTask › AbortError

Defined in: packages/common/src/Task.ts:537

Error returned when a Task is aborted via AbortSignal.

This is structured-concurrency control flow, not a domain error. It plays a role similar to an interrupt: in most code, propagate it unchanged or ignore it when cleanup is already handled by the runtime.

The reason field is unknown by design — use typed errors for business logic. If you need to inspect the reason, use type guards like RaceLostError.is(reason).

When a piece of logic must continue once started, wrap it with unabortable. That prevents ordinary mid-flight interruption, but it does not erase AbortError from the type because the Task can still be rejected before it starts, for example on an already-stopped Run. In those cases, abort usually indicates a lifecycle bug, so use assertNotAborted if you want to fail fast.

Extends

Properties

reason

reason: unknown;

Inherited from

AbortError.reason


type

type: "AbortError";

Inherited from

AbortError.type