# ActionResult
Source: https://docs.maelstrom-ai.co/dev/reference/client/type-aliases/actionresult/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **ActionResult** = [`Result`](https://docs.maelstrom-ai.co/dev/reference/client/type-aliases/result/)<`undefined`, `Error`\>

Defined in: [packages/client/src/lib/command-processor/action-result.ts:22](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/client/src/lib/command-processor/action-result.ts#L22)

Result returned by a vessel action handler.

Domain alias over the protocol’s generic `Result` that tightens the error channel to `Error`. Vessel author handlers signal success with `ok(value)` and failure with `err(new Error(...))` from `@maelstrom-co/protocol`.

## Example

```typescript
import { ok, err } from '@maelstrom-co/protocol';
import type { ActionResult } from '@maelstrom-co/client';

const handler = async (params: { orderId: string }): Promise<ActionResult> => {
  if (!params.orderId) return err(new Error('orderId required'));
  return ok(undefined);
};
```
