---
url: /api/kiln/classes/KilnError.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / KilnError

# Class: KilnError

Every error Kiln throws names the fix. `message` reads as "\<what happened>. \<what to do>".

## Extends

* `Error`

## Constructors

### Constructor

```ts
new KilnError(
   code, 
   message, 
   options?
): KilnError;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `code` | `string` |
| `message` | `string` |
| `options?` | { `cause?`: `unknown`; } |
| `options.cause?` | `unknown` |

#### Returns

`KilnError`

#### Overrides

```ts
Error.constructor
```

## Properties

### code

```ts
readonly code: string;
```
