# Interface UserErrorOptions

Options for the UserError class.

interface UserErrorOptions {
cause?: unknown;
code?: string;
metadata?: unknown;
}

#### Hierarchy

- ErrorOptions
  - UserErrorOptions

- Defined in rivetkit-typescript/packages/rivetkit/src/actor/errors.ts:183

##### Index

### Properties

cause?
code?
metadata?

## Properties

### `Optional` cause

cause?: unknown

Inherited from ErrorOptions.cause

- Defined in node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.error.d.ts:22

### `Optional` code

code?: string

Machine readable code for this error. Useful for catching different types of errors in try-catch.

- Defined in rivetkit-typescript/packages/rivetkit/src/actor/errors.ts:187

### `Optional` metadata

metadata?: unknown

Additional metadata related to the error. Useful for understanding context about the error.

- Defined in rivetkit-typescript/packages/rivetkit/src/actor/errors.ts:192