[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/notifications](../README) / NotificationDispatchError

# Class: NotificationDispatchError

Defined in: [notifications/src/errors.ts:99](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/errors.ts#L99)

Thrown when a notification finished dispatching but one or more channels
failed. Every channel is attempted regardless — a broken Slack webhook must
not cost the recipient their email — so this reports the failures together
once the rest have been delivered.

## Extends

- [`NotificationError`](NotificationError)

## Constructors

### Constructor

> **new NotificationDispatchError**(`notification`, `failures`, `delivered`): `NotificationDispatchError`

Defined in: [notifications/src/errors.ts:100](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/errors.ts#L100)

#### Parameters

##### notification

`string`

##### failures

`object`[]

##### delivered

`string`[]

#### Returns

`NotificationDispatchError`

#### Overrides

[`NotificationError`](NotificationError).[`constructor`](NotificationError#constructor)

## Properties

### code

> `readonly` **code**: `string`

Defined in: [core/src/errors/ZerotalError.ts:18](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/errors/ZerotalError.ts#L18)

#### Inherited from

[`NotificationError`](NotificationError).[`code`](NotificationError#code)

***

### status

> `readonly` **status**: `number` = `500`

Defined in: [core/src/errors/ZerotalError.ts:19](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/errors/ZerotalError.ts#L19)

#### Inherited from

[`NotificationError`](NotificationError).[`status`](NotificationError#status)

***

### context?

> `readonly` `optional` **context?**: `Record`\<`string`, `unknown`\>

Defined in: [core/src/errors/ZerotalError.ts:20](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/errors/ZerotalError.ts#L20)

#### Inherited from

[`NotificationError`](NotificationError).[`context`](NotificationError#context)

***

### notification

> `readonly` **notification**: `string`

Defined in: [notifications/src/errors.ts:101](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/errors.ts#L101)

***

### failures

> `readonly` **failures**: `object`[]

Defined in: [notifications/src/errors.ts:102](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/errors.ts#L102)

#### channel

> **channel**: `string`

#### error

> **error**: `Error`

***

### delivered

> `readonly` **delivered**: `string`[]

Defined in: [notifications/src/errors.ts:103](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/notifications/src/errors.ts#L103)
