# CustomIdErrors

`interface` in `custom-id` · v0.3.2

<https://seedcord.org/docs/packages/custom-id/0.3.2/interfaces/custom-id-errors>

Supply one constructor per failure. [`decode`](/docs/packages/custom-id/0.3.2/classes/custom-id#decode) throws whatever the matching one returns.

```ts
interface CustomIdErrors
```

## Methods

### invalid

```ts
invalid(detail: string): Error
```

Called when the wire is corrupt, truncated, or came from a different definition.

### stale

```ts
stale(prefix: string): Error
```

Called when the wire's prefix matches but its layout hash differs.
