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

***

[Documentation](../../../../README) / [@zerotal/core](../../README) / [security](../README) / DecryptionError

# Class: DecryptionError

Defined in: [crypt/Crypt.ts:31](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/crypt/Crypt.ts#L31)

Raised when a payload cannot be decrypted — wrong key or tampered data.

## Extends

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

## Constructors

### Constructor

> **new DecryptionError**(): `DecryptionError`

Defined in: [crypt/Crypt.ts:32](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/crypt/Crypt.ts#L32)

#### Returns

`DecryptionError`

#### Overrides

[`ZerotalError`](../../index/classes/ZerotalError).[`constructor`](../../index/classes/ZerotalError#constructor)

## Properties

### code

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

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

#### Inherited from

[`ZerotalError`](../../index/classes/ZerotalError).[`code`](../../index/classes/ZerotalError#code)

***

### status

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

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

#### Inherited from

[`ZerotalError`](../../index/classes/ZerotalError).[`status`](../../index/classes/ZerotalError#status)

***

### context?

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

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

#### Inherited from

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