# IssueCode

`import { IssueCode } from "destack:schema";`

Schema issue code.

```ds title="IssueCode"
export enum IssueCode {
    InvalidType = 1,
    MissingValue = 2,
    OutOfRange = 3,
    InvalidLength = 4,
    PatternMismatch = 5,
    RefinementFailed = 6,
}
```

[language/library/src/schema/error.ds:11:24](https://github.com/destack-sh/destack/blob/main/language/library/src/schema/error.ds#L11-L24)

## Variants

### `InvalidType = 1`

Value has the wrong type.

### `MissingValue = 2`

Value is missing.

### `OutOfRange = 3`

Value is outside an accepted range.

### `InvalidLength = 4`

Value length is outside accepted bounds.

### `PatternMismatch = 5`

Value does not match a required pattern.

### `RefinementFailed = 6`

Value failed a user-defined refinement.
