# GraphParseError

Defined in: [packages/graph/src/errors.ts:70](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/errors.ts#L70)

Thrown when decoding a `serializeGraph` artifact that is malformed or internally inconsistent.

## Extends

* [`ParseError`](/reference/knotkit/errors/classes/parseerror/)<[`GraphParseErrorCode`](/reference/knotkit/graph/type-aliases/graphparseerrorcode/)>

## Constructors

### Constructor

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

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_EDGE_SEQUENCE"` | `"INVALID_GRAPH_FLAGS"`

##### message

`string`

#### Returns

`GraphParseError`

#### Inherited from

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

## Properties

### \_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_EDGE_SEQUENCE"` | `"INVALID_GRAPH_FLAGS"`

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)

***

### moduleName

> `readonly` **moduleName**: `"knotkit/graph"`

Defined in: [packages/graph/src/errors.ts:71](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/errors.ts#L71)

#### Overrides

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