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

***

[Documentation](../../../../README) / [@zerotal/cache](../../README) / [index](../README) / CacheDeserializationError

# Class: CacheDeserializationError

Defined in: [cache/src/errors.ts:23](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/cache/src/errors.ts#L23)

Thrown when a cached value cannot be JSON-parsed on read.

## Extends

- [`CacheError`](CacheError)

## Constructors

### Constructor

> **new CacheDeserializationError**(`key`, `cause`): `CacheDeserializationError`

Defined in: [cache/src/errors.ts:24](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/cache/src/errors.ts#L24)

#### Parameters

##### key

`string`

##### cause

`unknown`

#### Returns

`CacheDeserializationError`

#### Overrides

[`CacheError`](CacheError).[`constructor`](CacheError#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

[`CacheError`](CacheError).[`code`](CacheError#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

[`CacheError`](CacheError).[`status`](CacheError#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

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