# LayerError

The only error a layer source rejects with.

This is a class exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { LayerError } from "@mapcairn/core";
 
class LayerError extends Error
```

## Constructors

### (constructor)

```ts
constructor(kind: LayerErrorKind, message?: string);
```

Constructs a new instance of the `LayerError` class

- `kind` (`LayerErrorKind`)
- `message?` (`string`)

## Properties

### kind

```ts
readonly kind: LayerErrorKind;
```

What went wrong: `network`, `invalid`, `empty` or `aborted`.

## See also

- [`LayerErrorKind`](https://docs.mapcairn.com/api/core/LayerErrorKind.md)

Source: [packages/core/src/ports/errors.ts:54](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/ports/errors.ts#L54)
