# DecodeError

`import { DecodeError } from "destack:string";`

Byte decoding failure.

```ds title="DecodeError"
export struct DecodeError {
    offset: usize;
    message: string;
}
```

[language/library/src/string/utf8.ds:6:12](https://github.com/destack-sh/destack/blob/main/language/library/src/string/utf8.ds#L6-L12)

## Members

### `offset: usize`

The byte offset where decoding failed.

### `message: string`

The error message.
