# UI diagnostics

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

Each UI error has a stable `code`. Its `docs` link opens the page of that code. This page lists all 7 codes, and [All diagnostics](https://vitehub.dev/docs/reference/diagnostics) lists every primitive.

## Runtime errors

| Code | What happened |
| --- | --- |
| [`UI_R0001`](https://vitehub.dev/docs/ui/diagnostics/ui_r0001) | Could not read \<name\>. |
| [`UI_R0002`](https://vitehub.dev/docs/ui/diagnostics/ui_r0002) | CommentLayer needs a `client` and a `subject`, or the `comments` state from useComments(). |

## Named errors

| Code | What happened |
| --- | --- |
| [`UI_CLIPBOARD_UNAVAILABLE`](https://vitehub.dev/docs/ui/diagnostics/ui_clipboard_unavailable) | The clipboard is not available. |
| [`UI_MARKDOWN_UPLOAD_URL_MISSING`](https://vitehub.dev/docs/ui/diagnostics/ui_markdown_upload_url_missing) | \<route\> stored \<file\> without a URL. Serve the Blob store with `blob.serve` so the editor can link it. |
| [`UI_RELATIVE_TIME_NOW_INVALID`](https://vitehub.dev/docs/ui/diagnostics/ui_relative_time_now_invalid) | RelativeTime cannot read the supplied clock value. |
| [`UI_RELATIVE_TIME_THRESHOLD_INVALID`](https://vitehub.dev/docs/ui/diagnostics/ui_relative_time_threshold_invalid) | RelativeTime threshold "\<threshold\>" is not a duration. |
| [`UI_ZIP_PATH_UNSAFE`](https://vitehub.dev/docs/ui/diagnostics/ui_zip_path_unsafe) | ZIP files must use safe project-relative paths. |

<!-- vitehub-docs:section-links -->
## In this section

- [Start](https://vitehub.dev/raw/docs/ui.md)
- [AI components](https://vitehub.dev/raw/docs/ui/ai-components.md)
- [Blocks](https://vitehub.dev/raw/docs/ui/blocks/chat-app.md)
- [Parts](https://vitehub.dev/raw/docs/ui/message.md)
- [Chat](https://vitehub.dev/raw/docs/ui/chat.md)
- [Collaboration](https://vitehub.dev/raw/docs/ui/avatar-stack.md)
- [Agent work](https://vitehub.dev/raw/docs/ui/tool-list.md)
- [Utilities](https://vitehub.dev/raw/docs/ui/attachments.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
