# Catchable

`function` in `seedcord` · v0.11.0

<https://docs.seedcord.org/packages/seedcord/0.11.0/functions/catchable>

Catches errors thrown in interaction handler methods and sends an error response.

Automatically sends error responses to users and prevents uncaught exceptions. Should be applied to the execute() or runChecks() methods of interaction handlers.

```ts
Catchable(
    options?: CatchableOptions
): (
    _target: RepliableInteractionHandler,
    _propertyKey: string,
    descriptor: TypedPropertyDescriptor<
        (...args: any[]) => Promise<void>
    >
) => void
```

Catches errors thrown in interaction handler methods and sends an error response.

Automatically sends error responses to users and prevents uncaught exceptions. Should be applied to the execute() or runChecks() methods of interaction handlers.

Parameters.

- `options?` `CatchableOptions` — Configuration for error handling behavior

Returns `(_target: RepliableInteractionHandler, _propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise<void>>) => void`.
