Attaches a callback for only the rejection of the Promise.
catch<TResult = never>(
onrejected: (reason: any) => TResult | PromiseLike<TResult> | null
): Promise<T | TResult>| Name | Type | Description |
|---|---|---|
onrejected | (reason: any) => TResult | PromiseLike<TResult> | null | The callback to execute when the Promise is rejected. |