# EGraphInvalidInputError

Defined in: [packages/e-graph/src/errors.ts:8](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/e-graph/src/errors.ts#L8)

Thrown when a caller passes an argument or object that violates a public contract: an out-of-range value, a malformed id, or an object not produced by the package’s own factories.

Abstract so every concrete instance belongs to the throwing package’s own subclass, which fixes `Code` to that package’s error-code union and gives `.name` a package-specific value.

## Extends

* [`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/)<[`EGraphInvalidInputErrorCode`](/reference/knotkit/e-graph/type-aliases/egraphinvalidinputerrorcode/)>

## Constructors

### Constructor

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

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

#### Parameters

##### code

`"FOREIGN_CLASS"` | `"INVALID_COST"` | `"COST_OVERFLOW"`

##### message

`string`

#### Returns

`EGraphInvalidInputError`

#### Inherited from

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`constructor`](/reference/knotkit/errors/classes/invalidinputerror/#constructor)

## Properties

### moduleName

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

Defined in: [packages/e-graph/src/errors.ts:9](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/e-graph/src/errors.ts#L9)

#### Overrides

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`moduleName`](/reference/knotkit/errors/classes/invalidinputerror/#modulename)

***

### \_tag

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

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

#### Inherited from

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`_tag`](/reference/knotkit/errors/classes/invalidinputerror/#_tag)

***

### code

> `readonly` **code**: `"FOREIGN_CLASS"` | `"INVALID_COST"` | `"COST_OVERFLOW"`

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

#### Inherited from

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`code`](/reference/knotkit/errors/classes/invalidinputerror/#code-1)
