[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Task](https://evolu.dev/docs/api-reference/common/Task) › AbortError

```ts
const AbortError: typed("AbortError", {
  reason: Unknown,
});
```

Defined in: [packages/common/src/Task.ts:537](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Task.ts#L537)

Error returned when a [Task](https://evolu.dev/docs/api-reference/common/Task/type-aliases/Task) is aborted via
[AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/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](https://evolu.dev/docs/api-reference/common/Task/variables/unabortable). That prevents ordinary mid-flight interruption, but it
does not erase [AbortError](https://evolu.dev/docs/api-reference/common/Task/variables/AbortError) from the type because the Task can still be
rejected before it starts, for example on an already-stopped [Run](https://evolu.dev/docs/api-reference/common/Task/interfaces/Run). In
those cases, abort usually indicates a lifecycle bug, so use
`assertNotAborted` if you want to fail fast.