# veryfront/errors

## Import

```ts
import {
  attachErrorToActiveSpan,
  attachErrorToSpan,
  cliErrorBoundary,
  cliErrorBoundarySync,
  createError,
  createErrorHandler,
} from "veryfront/errors";
```

## Examples

### Define and create a structured framework error

```ts
import { defineError } from "veryfront/errors";

const INVALID_WIDGET = defineError({
  slug: "invalid-widget",
  category: "GENERAL",
  title: "Invalid widget",
  status: 400,
});
throw INVALID_WIDGET.create({ detail: "The widget id is malformed." });
```

## Exports

### Components

| Name                                       | Description                                                                                                                                                                                                                                                                                                                                                                | Source                                                                                                    |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `AGENT_CONTEXT_WINDOW_EXCEEDED`            | An assembled request estimate or output request exceeds a served limit.                                                                                                                                                                                                                                                                                                    | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `AGENT_EMPTY_RESPONSE`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `AGENT_ERROR`                              |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `AGENT_INTENT_ERROR`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `AGENT_NOT_FOUND`                          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `AGENT_TIMEOUT`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `ALREADY_EXISTS`                           | Writing would replace something that is already there.                                                                                                                                                                                                                                                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `API_CLIENT_ERROR`                         | API client request/response errors (replaces VeryfrontAPIError)                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `API_ERROR`                                |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `API_ROUTE_ERROR`                          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/route.ts)        |
| `ASSET_OPTIMIZATION_ERROR`                 |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `AUTHENTICATION_REQUIRED`                  |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `BRANCH_NOT_FOUND`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `BUILD_ERROR_CATALOG`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/build-errors.ts)        |
| `BUILD_FAILED`                             |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `BUNDLE_ERROR`                             |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `CACHE_ERROR`                              |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `CACHE_INVARIANT_VIOLATION`                | Cache path invariant violations (replaces CacheInvariantError)                                                                                                                                                                                                                                                                                                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `CACHE_PATH_MISMATCH`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `CIRCUIT_BREAKER_OPEN`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `CIRCULAR_DEPENDENCY`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `CLIENT_BOUNDARY_VIOLATION`                |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `CLIENT_ONLY_IN_SERVER`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `COMPILATION_ERROR`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `COMPONENT_ERROR`                          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `CONFIG_ERROR_CATALOG`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/config-errors.ts)       |
| `CONFIG_INVALID`                           |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `CONFIG_NOT_DEPLOYABLE`                    | The project's configuration file uses a construct Veryfront Cloud's configuration evaluator can never accept, so the release would answer 500 to every request. Raised before a release is created; the detail names the file, the change that makes the project deployable, and the line when the evaluator located the construct it refused.                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `CONFIG_NOT_FOUND`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `CONFIG_PARSE_ERROR`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `CONFIG_TYPE_ERROR`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `CONFIG_VALIDATION_ERROR`                  | Schema-level config validation (e.g. Zod schema mismatch at runtime)                                                                                                                                                                                                                                                                                                       | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `CONFIG_VALIDATION_FAILED`                 | Config file validation failures (replaces ConfigValidationError)                                                                                                                                                                                                                                                                                                           | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `CORS_CONFIG_INVALID`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `COST_LIMIT_EXCEEDED`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `DEFAULT_MODEL_CREDENTIAL_MISMATCH`        | The default model's provider has no credential while a different provider does. Resolution stays deterministic rather than silently substituting whichever key happens to be present on this machine.                                                                                                                                                                      | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `DEPENDENCY_MISSING`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `DEPENDENCY_SNAPSHOT_STORE_UNAVAILABLE`    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `DEPLOYMENT_ERROR`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `DEPLOYMENT_ERROR_CATALOG`                 |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/deployment-errors.ts)   |
| `DEPLOYMENT_VERIFICATION_TIMEOUT`          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `DEV_ERROR_CATALOG`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/dev-errors.ts)          |
| `DEV_SERVER_ERROR`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/dev.ts)          |
| `DURABLE_RUN_EVENT_PERSISTENCE_FAILED`     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `DYNAMIC_ROUTE_ERROR`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/route.ts)        |
| `ENV_VAR_MISSING`                          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `ENVIRONMENT_NOT_FOUND`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `ENVIRONMENT_NOT_ROUTABLE`                 |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `ERROR_CATALOG`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/index.ts)               |
| `ERROR_OVERLAY_ERROR`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/dev.ts)          |
| `ERROR_REGISTRY`                           | Central registry mapping every error slug to its definition. Assembled from the per-category registry fragments.                                                                                                                                                                                                                                                           | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry.ts)              |
| `ERROR_SOLUTIONS`                          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/user-friendly/error-catalog.ts) |
| `ESM_CACHE_INIT_FAILED`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `EVAL_INFERENCE_POLICY_DENIED`             | An eval stopped because a provider-executed tool is not available under the project's EU-only inference policy.                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_MODEL_ACCESS_DENIED`                 | An eval stopped because the model gateway refused to serve its model requests for billing or entitlement reasons (HTTP 402). Every later record would fail the same way, so the run fails fast with one actionable error instead of grading empty outputs.                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_MODEL_EGRESS_BLOCKED`                | An eval stopped because the host egress policy blocked its model gateway request: the Veryfront API host resolves to a private network address. The policy blocks every later record the same way.                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_MODEL_INFERENCE_POLICY_DENIED`       | An eval stopped because the Veryfront Cloud gateway refused its model request under a model policy (account, project or API key). Every later record sends the same model and tools, so it is refused the same way.                                                                                                                                                        | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_MODEL_PROJECT_ACCESS_DENIED`         | An eval stopped because the Veryfront Cloud gateway denied the credential access to the linked project (HTTP 403).                                                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_MODEL_SPEND_LIMIT_EXCEEDED`          | An eval stopped because Veryfront reached its AI provider spend limit for the current window. Buying credits does not clear this limit.                                                                                                                                                                                                                                    | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_MODEL_UNAUTHORIZED`                  | An eval stopped because the Veryfront Cloud gateway rejected the API credential for its model requests (HTTP 401).                                                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_PROJECT_REQUIRED`                    | An eval stopped because the Veryfront Cloud gateway rejected its model requests for naming no project (HTTP 400, `gateway_project_required`).                                                                                                                                                                                                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `EVAL_RECORD_TIMEOUT`                      | An eval record ran past its time limit. The limit covers the whole record: target execution, tools, model requests, metrics, and checks. A model stream that stops sending data after its response headers has no deadline of its own, so the record limit is what keeps an eval run from waiting forever.                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `FALLBACK_EXHAUSTED`                       | Both primary and fallback operations failed (replaces FallbackExecutionError)                                                                                                                                                                                                                                                                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `FAST_REFRESH_ERROR`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/dev.ts)          |
| `FILE_NOT_FOUND`                           |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `FILE_WATCH_ERROR`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `GENERAL_ERROR_CATALOG`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/general-errors.ts)      |
| `HMR_ERROR`                                |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/dev.ts)          |
| `HYDRATION_MISMATCH`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `IMPORT_MAP_INVALID`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `IMPORT_RESOLUTION_ERROR`                  |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `INITIALIZATION_ERROR`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `INPUT_VALIDATION_FAILED`                  | HTTP request input validation failures (replaces ValidationError)                                                                                                                                                                                                                                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `INVALID_ARGUMENT`                         | A value the caller supplied is not acceptable: a CLI flag, a positional argument, a config field, or a function argument. Exit code 2 is the CLI's "invalid usage" code, so a script can tell a typo from a failed run.                                                                                                                                                    | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `INVALID_IMPORT`                           |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `INVALID_ROUTE_FILE`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/route.ts)        |
| `INVALID_USE_CLIENT`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `INVALID_USE_SERVER`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `LAYOUT_NOT_FOUND`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `LOCAL_INTEGRATION_CONFIG_INVALID`         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `LOCAL_INTEGRATION_CREDENTIAL_UNAVAILABLE` |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `LOCAL_INTEGRATION_CREDENTIALS_MISSING`    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `LOCAL_INTEGRATION_REQUEST_FAILED`         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `LOCAL_INTEGRATION_REQUEST_INVALID`        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `LOCAL_INTEGRATION_RESPONSE_INVALID`       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `LOCKFILE_FORMAT_MISMATCH`                 |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `LOCKFILE_READ_ERROR`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `MARKDOWN_COMPILE_ERROR`                   |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `MDX_COMPILE_ERROR`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `MIDDLEWARE_ERROR`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `MODULE_ERROR_CATALOG`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/module-errors.ts)       |
| `MODULE_NOT_FOUND`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `NESTED_CWD_SCOPE`                         | A scope that owns the process working directory was opened inside another one.                                                                                                                                                                                                                                                                                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `NETWORK_ERROR`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `NOT_SUPPORTED`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `ORCHESTRATION_ERROR`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `PAGE_NOT_FOUND`                           |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `PERMISSION_DENIED`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `PLATFORM_ERROR`                           |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `PORT_IN_USE`                              |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `PREVIEW_DEPLOYMENT_NOT_ALLOWED`           | Veryfront's managed Preview environment renders the latest source on the main branch. It has no release to swap, so the API refuses deployments to it.                                                                                                                                                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `PREVIEW_HOSTNAME_TOO_LONG`                |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `PROBLEM_JSON_CONTENT_TYPE`                | Content-Type header for RFC 9457 responses                                                                                                                                                                                                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                  |
| `PRODUCTION_BUILD_REQUIRED`                |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `PROJECT_EXECUTION_UNAVAILABLE`            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `PROJECT_LINK_STALE`                       | The local link in `.veryfront/project.json` names a project the control plane will not hand back. The link records no owning account, so a deleted project and one owned by a different account are indistinguishable here, so the CLI's detail names both. Reserved for the local link: any other project reference is misdirected by a suggestion to delete this file.   | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `PROJECT_SOURCE_EMPTY`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `PROVIDER_REPLAY_CHECKPOINT_INVALID`       | Provider replay checkpoint state failed validation at a consumer boundary. Replay state guards provider protocol correctness on resume, so malformed or unappliable state fails closed instead of degrading into an unsigned replay. Details never include checkpoint contents: provider blocks carry signed reasoning material that must stay out of logs and error text. | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `PUSH_CONFLICT`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `PUSH_RECEIPT_MISSING`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `RAG_STORE_CORRUPT`                        | Persisted RAG index is malformed or failed structural validation.                                                                                                                                                                                                                                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `RAG_STORE_UNAVAILABLE`                    | A persisted RAG index operation could not be completed safely.                                                                                                                                                                                                                                                                                                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `REDIRECT_DESTINATION_NOT_ALLOWED`         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `RELEASE_BUILD_TIMEOUT`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `RELEASE_MISSING_VERSION`                  |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `RELEASE_NOT_FOUND`                        | Production domain resolved but no active release found                                                                                                                                                                                                                                                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `RENDER_ERROR`                             |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `REQUEST_ERROR`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `RESOURCE_NOT_FOUND`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `ROUTE_CONFLICT`                           |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/route.ts)        |
| `ROUTE_ERROR_CATALOG`                      |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/route-errors.ts)        |
| `ROUTE_HANDLER_INVALID`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/route.ts)        |
| `ROUTE_PARAMS_ERROR`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/route.ts)        |
| `RSC_ERROR_CATALOG`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/rsc-errors.ts)          |
| `RSC_PAYLOAD_ERROR`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `RUNTIME_ERROR_CATALOG`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/runtime-errors.ts)      |
| `SCHEDULE_CONFIG_INVALID`                  | Schedule definition validation failures (required fields, cron, concurrencyPolicy, target)                                                                                                                                                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `SECURITY_VIOLATION`                       | Path traversal / secure-fs violations (replaces SecurityError)                                                                                                                                                                                                                                                                                                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `SEMAPHORE_TIMEOUT`                        |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `SERVER_ERROR_CATALOG`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/server-errors.ts)       |
| `SERVER_ONLY_IN_CLIENT`                    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `SERVER_START_ERROR`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `SERVICE_OVERLOADED`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `SOURCE_DIGEST_MISMATCH`                   |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `SOURCE_MAP_ERROR`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/dev.ts)          |
| `SOURCE_SNAPSHOT_FRESHNESS_UNAVAILABLE`    |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `SOURCEMAP_ERROR`                          |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `SSG_GENERATION_ERROR`                     |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `SSR_OUTPUT_LIMIT_EXCEEDED`                |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/boundary.ts)     |
| `SYNC_STATE_INVALID`                       |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/deploy.ts)       |
| `TEMPLATE_NOT_FOUND`                       | `veryfront init --template <name>` (and `npm create veryfront -- --template`) was given a name that is not in the starter catalog. The detail carries the list of valid names so a wrong guess is self-correcting.                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `TIMEOUT_ERROR`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `TOKEN_STORAGE_ERROR`                      | Token storage adapter failures (replaces TokenStorageError)                                                                                                                                                                                                                                                                                                                | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/server.ts)       |
| `TOOL_ID_CONFLICT`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/agent.ts)        |
| `TRIGGER_CONFIG_INVALID`                   | Trigger ID format and input serialization validation failures                                                                                                                                                                                                                                                                                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |
| `TRIGGER_EXECUTION_FAILED`                 | Trigger target task or workflow failed during local run                                                                                                                                                                                                                                                                                                                    | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `TRIGGER_NOT_SUPPORTED`                    | Trigger target type is not supported in the current runtime context                                                                                                                                                                                                                                                                                                        | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `TRIGGER_TARGET_NOT_FOUND`                 | Trigger target (task or workflow) not found during local run                                                                                                                                                                                                                                                                                                               | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/runtime.ts)      |
| `TYPESCRIPT_ERROR`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/build.ts)        |
| `UNKNOWN_ERROR`                            |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts)      |
| `VERSION_MISMATCH`                         |                                                                                                                                                                                                                                                                                                                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts)       |
| `WEBHOOK_CONFIG_INVALID`                   | Webhook definition validation failures (required fields, target, eventFilter)                                                                                                                                                                                                                                                                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/config.ts)       |

### Functions

| Name                                | Description                                                                                                                                     | Source                                                                                                       |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `attachErrorToActiveSpan`           | Attach error to the currently active span (if any)                                                                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/tracing.ts)                        |
| `attachErrorToSpan`                 | Attach error metadata to an OpenTelemetry span                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/tracing.ts)                        |
| `cliErrorBoundary`                  | CLI error boundary - wraps a handler function and catches errors                                                                                | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/cli-error-boundary.ts)  |
| `cliErrorBoundarySync`              | Synchronous version of CLI error boundary                                                                                                       | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/cli-error-boundary.ts)  |
| `createError`                       |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/veryfront-error.ts)                |
| `createErrorHandler`                | Express/Hono-style error handler middleware factory                                                                                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `createErrorResponse`               | Create an RFC 9457 compliant error Response                                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `createErrorResponseFromDefinition` | Create an RFC 9457 error Response from a registered error definition                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `createErrorScope`                  | Create a scoped error context helper for multiple related operations                                                                            | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)                  |
| `createErrorSolution`               |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/factory.ts)                |
| `createProblemResponse`             | Create an RFC 9457 error Response from raw parameters                                                                                           | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `createSimpleError`                 |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/factory.ts)                |
| `defineError`                       | Define an error in the registry                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                          |
| `ensureError`                       | Ensure a value is an Error while preserving the established identity contract for ordinary Error instances.                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/veryfront-error.ts)                |
| `errorToResponse`                   | Convert any error to an RFC 9457 Response                                                                                                       | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `errorToRFC9457Response`            | Convert any error to an RFC 9457 Response with environment-aware filtering                                                                      | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/http-error-boundary.ts) |
| `formatCLIError`                    | Format any error for CLI output                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/cli-error-boundary.ts)  |
| `formatErrorLog`                    | Log format for errors (matches the plan's log format spec)                                                                                      | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `formatUserError`                   | Format error with plain text (existing behavior)                                                                                                | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/user-friendly/error-formatter.ts)  |
| `fromError`                         | Decode legacy Veryfront error data attached by `toError()`.                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/legacy-error-codec.ts)             |
| `getAllSlugs`                       | Get all registered slugs                                                                                                                        | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry.ts)                 |
| `getErrorBySlug`                    | Get an error definition by slug                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry.ts)                 |
| `getErrorMessage`                   | Extract error message from any error type                                                                                                       | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/veryfront-error.ts)                |
| `getErrorsByCategory`               | Get all errors in a category                                                                                                                    | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry.ts)                 |
| `getErrorSolution`                  |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/index.ts)                  |
| `handleErrorWithFallback`           |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-handlers.ts)                 |
| `handleErrorWithFallbackSync`       |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-handlers.ts)                 |
| `httpErrorBoundary`                 | Wrap a handler with error boundary that catches all errors and converts them to RFC 9457 Problem Details responses.                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/http-error-boundary.ts) |
| `identifyError`                     |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/user-friendly/error-identifier.ts) |
| `isVeryfrontError`                  | Check if an error is a VeryfrontError with slug-based identity                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/http-error.ts)                     |
| `logError`                          | Log a VeryfrontError with structured formatting                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/logging.ts)                        |
| `logErrorWithMessage`               | Log an error with a custom message prefix                                                                                                       | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/logging.ts)                        |
| `retryWithBackoff`                  |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-handlers.ts)                 |
| `safeFileRead`                      | Safe file read with logging                                                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)                  |
| `safeFileStat`                      | Safe file stat with logging                                                                                                                     | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)                  |
| `safeReadDir`                       | Safe directory read with logging                                                                                                                | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)                  |
| `sanitizeTerminalDiagnosticText`    | Prepare one untrusted diagnostic field for terminal or plain-text output. Apply framework-owned ANSI styling only after this sanitizer returns. | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/safe-diagnostics.ts)               |
| `searchErrors`                      |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/index.ts)                  |
| `toError`                           | Convert a VeryfrontErrorData (plain object) to a throwable Error instance.                                                                      | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/veryfront-error.ts)                |
| `withErrorContext`                  | Execute async operation with error logging and fallback                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)                  |
| `withErrorContextSync`              | Execute sync operation with error logging and fallback                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)                  |
| `wrapErrorHandler`                  |                                                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/user-friendly/error-wrapper.ts)    |
| `wrapHandlerWithErrorBoundary`      | Wrap a complete Handler object with error boundary                                                                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/http-error-boundary.ts) |
| `wrapUnknownError`                  | Return a detached VeryfrontError, preserving safe identity fields from valid VeryfrontError inputs                                              | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/wrap-unknown.ts)        |
| `wrapWithContext`                   | Wrap an error with additional context                                                                                                           | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/middleware/wrap-unknown.ts)        |

### Classes

| Name             | Description                                          | Source                                                                              |
| ---------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `VeryfrontError` | Veryfront Error class with slug-based error identity | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts) |

### Types

| Name                        | Description                                                                                                                                                      | Source                                                                                                    |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `ConfigContext`             |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/veryfront-error.ts)             |
| `ErrorCatalog`              |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/types.ts)               |
| `ErrorCategory`             | Error categories for domain-based grouping and handling                                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                       |
| `ErrorContext`              |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)               |
| `ErrorCreateOptions`        | Options for creating an error instance                                                                                                                           | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                       |
| `ErrorDefinition`           | Error definition for the registry                                                                                                                                | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                       |
| `ErrorHandlingOptions`      |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)               |
| `ErrorLogEntry`             |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/logging.ts)                     |
| `ErrorSlug`                 |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry.ts)              |
| `ErrorSolution`             |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/types.ts)               |
| `LogLevel`                  |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-context.ts)               |
| `PartialErrorCatalog`       |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/catalog/types.ts)               |
| `RegisteredError`           | Registered error with factory method                                                                                                                             | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                       |
| `RetryWithBackoffOptions`   | Options for `retryWithBackoff`. Every `attempt` value passed to `fn` and the hooks below is 0-based (first try = 0), including `wrapFinalError`'s `lastAttempt`. | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-handlers.ts)              |
| `RFC9457Response`           | RFC 9457 Problem Details response shape                                                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                       |
| `UserFriendlyErrorSolution` |                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/user-friendly/error-catalog.ts) |
| `VeryfrontErrorData`        | Discriminated union for serializable error data.                                                                                                                 | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/veryfront-error.ts)             |
| `VeryfrontErrorOptions`     | Options for VeryfrontError constructor                                                                                                                           | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/types.ts)                       |

## Deep imports

These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.

### `veryfront/errors/general`

```ts
import { ALREADY_EXISTS, AUTHENTICATION_REQUIRED, FILE_NOT_FOUND } from "veryfront/errors/general";
```

#### Components

| Name                      | Description                                                                                                                                                                                                             | Source                                                                                               |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `ALREADY_EXISTS`          | Writing would replace something that is already there.                                                                                                                                                                  | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `AUTHENTICATION_REQUIRED` |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `FILE_NOT_FOUND`          |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `GENERAL_REGISTRY`        | Registry fragment for GENERAL errors (slug → definition).                                                                                                                                                               | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `INITIALIZATION_ERROR`    |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `INPUT_VALIDATION_FAILED` | HTTP request input validation failures (replaces ValidationError)                                                                                                                                                       | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `INVALID_ARGUMENT`        | A value the caller supplied is not acceptable: a CLI flag, a positional argument, a config field, or a function argument. Exit code 2 is the CLI's "invalid usage" code, so a script can tell a typo from a failed run. | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `NESTED_CWD_SCOPE`        | A scope that owns the process working directory was opened inside another one.                                                                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `NOT_SUPPORTED`           |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `PERMISSION_DENIED`       |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `PROJECT_SOURCE_EMPTY`    |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `RESOURCE_NOT_FOUND`      |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `SECURITY_VIOLATION`      | Path traversal / secure-fs violations (replaces SecurityError)                                                                                                                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `TIMEOUT_ERROR`           |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |
| `UNKNOWN_ERROR`           |                                                                                                                                                                                                                         | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/general.ts) |

### `veryfront/errors/module`

```ts
import {
  CIRCULAR_DEPENDENCY,
  DEPENDENCY_MISSING,
  IMPORT_RESOLUTION_ERROR,
} from "veryfront/errors/module";
```

#### Components

| Name                       | Description                                              | Source                                                                                              |
| -------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `CIRCULAR_DEPENDENCY`      |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `DEPENDENCY_MISSING`       |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `IMPORT_RESOLUTION_ERROR`  |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `INVALID_IMPORT`           |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `LOCKFILE_FORMAT_MISMATCH` |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `LOCKFILE_READ_ERROR`      |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `MODULE_NOT_FOUND`         |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `MODULE_REGISTRY`          | Registry fragment for MODULE errors (slug → definition). | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
| `VERSION_MISMATCH`         |                                                          | [source](https://github.com/veryfront/veryfront-code/blob/main/src/errors/error-registry/module.ts) |
