# Error

`import { Error } from "destack:simulation/fault";`

Error payload for operation and randomness faults.

```ds title="Error"
export struct Error {
    code: ErrorCode;
    class: string;
    message: string;
}
```

[language/library/src/simulation/fault/fault.ds:10:17](https://github.com/destack-sh/destack/blob/main/language/library/src/simulation/fault/fault.ds#L10-L17)

## Members

### `code: ErrorCode`

Stable error code.

### `class: string`

Optional module-specific error class.

### `message: string`

Optional diagnostic message.
