## ReadablePromise.catch() method

Attaches a callback for only the rejection of the Promise.

**Signature:**

```typescript
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
```

## Parameters

| Parameter   | Type                                                                                | Description                                                         |
| ----------- | ----------------------------------------------------------------------------------- |---------------------------------------------------------------------|
| onrejected  | ((reason: any) => TResult \| PromiseLike<TResult>) \| null                      | _(Optional)_ The callback to execute when the Promise is rejected.   |

**Returns:**

Promise<T \| TResult>

A Promise for the completion of the callback.
