# Runtime diagnostics

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

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

## Runtime errors

| Code | What happened |
| --- | --- |
| [`RUNTIME_LEASE_FAILED`](https://vitehub.dev/docs/runtime/diagnostics/runtime_lease_failed) | The lease store could not \<operation\> the lease \<key\>. |
| [`RUNTIME_LEASE_INVALID_TTL`](https://vitehub.dev/docs/runtime/diagnostics/runtime_lease_invalid_ttl) | `ttl` must be a positive number of seconds. |
| [`RUNTIME_R0001`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0001) | Diagnostic error maxDepth must be a non-negative integer. |
| [`RUNTIME_R0002`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0002) | Diagnostic error maxErrors must be a positive integer. |
| [`RUNTIME_R0003`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0003) | Diagnostic error maxStringLength must be an integer of at least 64. |
| [`RUNTIME_R0004`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0004) | Process drain reported \<status\>. |
| [`RUNTIME_R0005`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0005) | Process \<pid\> exited before drain completed. |
| [`RUNTIME_R0006`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0006) | ViteHubError requires a valid public error contract. |
| [`RUNTIME_R0007`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0007) | Invalid execution authority descriptor. |
| [`RUNTIME_R0009`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0009) | Process reconciler intervalMs must be between 1 and 2,147,483,647 milliseconds. |
| [`RUNTIME_R0010`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0010) | Process reconciler signal \<configuredSignal\> cannot be handled. |
| [`RUNTIME_R0011`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0011) | Process reconciler callbacks cannot call drain() while active. |
| [`RUNTIME_R0015`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0015) | The event has no request, so ViteHub cannot set `~standard`. Pass the event of an H3 or Nitro route. |
| [`RUNTIME_R0016`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0016) | H3 does not read `~standard.res.body`. Return the body or a Response from the handler. |
| [`RUNTIME_R0017`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0017) | \<instancesEnvName\> is \<instances\>, but these primitives keep their state in one process or on one host. Each instance would see different data: |
| [`RUNTIME_R0018`](https://vitehub.dev/docs/runtime/diagnostics/runtime_r0018) | \<source\> must be a positive integer. It is \<value\>. |

## Named errors

| Code | What happened |
| --- | --- |
| [`RUNTIME_CONSOLE_PATH_INVALID`](https://vitehub.dev/docs/runtime/diagnostics/runtime_console_path_invalid) | \<value\> is not a Console path. Use a path that starts with one /, such as /agents/\<agent\>. |
| [`RUNTIME_CONSOLE_PROJECT_URL_INVALID`](https://vitehub.dev/docs/runtime/diagnostics/runtime_console_project_url_invalid) | \<value\> is not a project URL. Use the https:// origin of the app, with its base path if it has one. |
| [`RUNTIME_DURATION_INVALID`](https://vitehub.dev/docs/runtime/diagnostics/runtime_duration_invalid) | \<value\> is \<value\>, which is not a duration. A duration is a string with a number of 0 or more and a unit, such as "30s", "5m", or "1 day". |
| [`RUNTIME_EXECUTION_BUDGET_AMOUNT_INVALID`](https://vitehub.dev/docs/runtime/diagnostics/runtime_execution_budget_amount_invalid) | Execution budget \<counter\> amount must be a finite non-negative number. |
| [`RUNTIME_EXECUTION_BUDGET_EXCEEDED`](https://vitehub.dev/docs/runtime/diagnostics/runtime_execution_budget_exceeded) | Execution budget exhausted for \<counter\>. |
| [`RUNTIME_EXECUTION_BUDGET_LIMIT_INVALID`](https://vitehub.dev/docs/runtime/diagnostics/runtime_execution_budget_limit_invalid) | Execution budget limits must be finite non-negative numbers. |
| [`RUNTIME_HIDDEN_ERROR`](https://vitehub.dev/docs/runtime/diagnostics/runtime_hidden_error) | The server failed. The error is not a ViteHub error, so its message and stack stay on the server. |
| [`RUNTIME_SERIALIZED_RESPONSE_INVALID`](https://vitehub.dev/docs/runtime/diagnostics/runtime_serialized_response_invalid) | Invalid serialized Response |

## Errors

| Code | What happened |
| --- | --- |
| [`RUNTIME_HOST_BINDING_NOT_FOUND`](https://vitehub.dev/docs/runtime/diagnostics/runtime_host_binding_not_found) | The Worker has no binding named "\<name\>". |
| [`RUNTIME_HOST_BINDINGS_UNAVAILABLE`](https://vitehub.dev/docs/runtime/diagnostics/runtime_host_bindings_unavailable) | This code runs without host bindings, so the binding "\<name\>" is not available. Only Cloudflare Workers give bindings. |

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

- [Start](https://vitehub.dev/raw/docs/runtime.md)
- [Reference](https://vitehub.dev/raw/docs/runtime/context.md)

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