# Libtmux_json.Error

- **Package:** libtmux-json
- **Language:** OCaml
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/json/libtmux_json.mli#L26
- **Public owner:** Libtmux_json
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_json-error/

```ocaml
module Error
```

Structured native failures for JSON consumers.

## Members

### Other members

- [`encode`](/en/ocaml/latest/reference/libtmux_json-error-encode/) (function): Return a stable `code`, bounded `message`, `message_truncated` flag and relevant operation, resource or target metadata. Messages and text attributes retain at most 4096 bytes; invalid UTF-8 uses the tagged hex representation described by {!Workspace.encode_receipt}. No I/O.
