# DisjointSetParseError

Defined in: [packages/disjoint-set/src/errors.ts:58](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/errors.ts#L58)

Thrown when decoding a `SerializedDisjointSet` that is malformed or fails validation.

## Extends

* [`ParseError`](/reference/knotkit/errors/classes/parseerror/)<[`DisjointSetParseErrorCode`](/reference/knotkit/disjoint-set/type-aliases/disjointsetparseerrorcode/)>

## Constructors

### Constructor

> **new DisjointSetParseError**(`code`, `message`): `DisjointSetParseError`

Defined in: [packages/errors/src/index.ts:57](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L57)

#### Parameters

##### code

`"INVALID_CODEC_RESULT"` | `"INVALID_MAGIC"` | `"UNSUPPORTED_ENVELOPE_VERSION"` | `"UNSUPPORTED_PAYLOAD_VERSION"` | `"INVALID_SECTION_GEOMETRY"` | `"NONZERO_PADDING"` | `"MISALIGNED_SECTION"` | `"TRUNCATED_PAYLOAD"` | `"DECODE_BUDGET_EXCEEDED"` | `"UNSTABLE_BUFFER"` | `"WRONG_FORMAT"` | `"INTEGRITY_MISMATCH"` | `"UNKNOWN_KIND"` | `"INVALID_PACKAGE_HEADER"` | `"INVALID_SHAPE"` | `"UNSUPPORTED_SCHEMA_VERSION"` | `"MISSING_ELEMENTS"` | `"INVALID_LABELS"` | `"INVALID_INDEXED_ELEMENT"` | `"INVALID_ELEMENT"` | `"ELEMENTS_LABELS_LENGTH_MISMATCH"` | `"DUPLICATE_ELEMENT"`

##### message

`string`

#### Returns

`DisjointSetParseError`

#### Inherited from

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`constructor`](/reference/knotkit/errors/classes/parseerror/#constructor)

## Properties

### moduleName

> `readonly` **moduleName**: `"knotkit/disjoint-set"`

Defined in: [packages/disjoint-set/src/errors.ts:59](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/errors.ts#L59)

#### Overrides

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`moduleName`](/reference/knotkit/errors/classes/parseerror/#modulename)

***

### \_tag

> `readonly` **\_tag**: `"ParseError"`

Defined in: [packages/errors/src/index.ts:55](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L55)

#### Inherited from

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`_tag`](/reference/knotkit/errors/classes/parseerror/#_tag)

***

### code

> `readonly` **code**: `"INVALID_CODEC_RESULT"` | `"INVALID_MAGIC"` | `"UNSUPPORTED_ENVELOPE_VERSION"` | `"UNSUPPORTED_PAYLOAD_VERSION"` | `"INVALID_SECTION_GEOMETRY"` | `"NONZERO_PADDING"` | `"MISALIGNED_SECTION"` | `"TRUNCATED_PAYLOAD"` | `"DECODE_BUDGET_EXCEEDED"` | `"UNSTABLE_BUFFER"` | `"WRONG_FORMAT"` | `"INTEGRITY_MISMATCH"` | `"UNKNOWN_KIND"` | `"INVALID_PACKAGE_HEADER"` | `"INVALID_SHAPE"` | `"UNSUPPORTED_SCHEMA_VERSION"` | `"MISSING_ELEMENTS"` | `"INVALID_LABELS"` | `"INVALID_INDEXED_ELEMENT"` | `"INVALID_ELEMENT"` | `"ELEMENTS_LABELS_LENGTH_MISMATCH"` | `"DUPLICATE_ELEMENT"`

Defined in: [packages/errors/src/index.ts:58](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L58)

#### Inherited from

[`ParseError`](/reference/knotkit/errors/classes/parseerror/).[`code`](/reference/knotkit/errors/classes/parseerror/#code-1)
