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

## Call Signature

```ts
function assertNotAborted<T>(
  result: Result<T, AbortError>,
  message?: string,
): asserts result is Ok<T>;
```

Defined in: [packages/common/src/Assert.ts:122](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Assert.ts#L122)

Asserts that a [Result](https://evolu.dev/docs/api-reference/common/Result/type-aliases/Result) did not fail with `AbortError`.

Use when abort would indicate a programmer error rather than ordinary control
flow.

In general, abort is normal control flow. Stopping work and returning
`AbortError` is the correct behavior when a `Run` or `Fiber` is cancelled.

Use `assertNotAborted` only to protect invariants in code that has already
decided abort must not happen, such as resource helpers built on
`unabortable`. In those places it helps fail fast on mistakes, because
TypeScript cannot fully enforce that lifecycle logic is correct.

## Call Signature

```ts
function assertNotAborted<T, E>(
  result: Result<T, AbortError | E>,
  message?: string,
): asserts result is Result<T, E>;
```

Defined in: [packages/common/src/Assert.ts:126](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Assert.ts#L126)

Asserts that a [Result](https://evolu.dev/docs/api-reference/common/Result/type-aliases/Result) did not fail with `AbortError`.

Use when abort would indicate a programmer error rather than ordinary control
flow.

In general, abort is normal control flow. Stopping work and returning
`AbortError` is the correct behavior when a `Run` or `Fiber` is cancelled.

Use `assertNotAborted` only to protect invariants in code that has already
decided abort must not happen, such as resource helpers built on
`unabortable`. In those places it helps fail fast on mistakes, because
TypeScript cannot fully enforce that lifecycle logic is correct.