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

***

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

# Class: NotificationError

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

Base class for all @zerotal/notifications errors.

## Extends

- [`ZerotalError`](../../core/index/classes/ZerotalError)

## Extended by

- [`UnknownNotificationChannelError`](UnknownNotificationChannelError)
- [`NotificationChannelNotConfiguredError`](NotificationChannelNotConfiguredError)
- [`NotificationDeliveryError`](NotificationDeliveryError)
- [`NotificationChannelUnavailableError`](NotificationChannelUnavailableError)
- [`NotificationContractError`](NotificationContractError)
- [`UnknownNotificationTypeError`](UnknownNotificationTypeError)
- [`NotificationDispatchError`](NotificationDispatchError)
- [`SmtpResponseError`](SmtpResponseError)
- [`SmtpConnectionError`](SmtpConnectionError)
- [`NotificationConfigError`](NotificationConfigError)
- [`UnknownSmsDriverError`](UnknownSmsDriverError)

## Constructors

### Constructor

> **new NotificationError**(`message`, `code?`, `status?`, `context?`): `NotificationError`

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

#### Parameters

##### message

`string`

##### code?

`string` = `"E_NOTIFICATION"`

##### status?

`number` = `500`

##### context?

`Record`\<`string`, `unknown`\>

#### Returns

`NotificationError`

#### Overrides

[`ZerotalError`](../../core/index/classes/ZerotalError).[`constructor`](../../core/index/classes/ZerotalError#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

[`ZerotalError`](../../core/index/classes/ZerotalError).[`code`](../../core/index/classes/ZerotalError#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

[`ZerotalError`](../../core/index/classes/ZerotalError).[`status`](../../core/index/classes/ZerotalError#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

[`ZerotalError`](../../core/index/classes/ZerotalError).[`context`](../../core/index/classes/ZerotalError#context)
