Home / File/ errors-data.ts — astro Source File

errors-data.ts — astro Source File

Architecture documentation for errors-data.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript CoreAstro RenderingEngine 1 imports 84 functions

Entity Profile

Dependency Diagram

graph LR
  0e25cce4_bb3d_83b8_da61_b3d3cc567b74["errors-data.ts"]
  a2586aae_ce09_613d_4444_659268b61a89["core"]
  0e25cce4_bb3d_83b8_da61_b3d3cc567b74 --> a2586aae_ce09_613d_4444_659268b61a89
  style 0e25cce4_bb3d_83b8_da61_b3d3cc567b74 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// BEFORE ADDING AN ERROR: Please look at the README.md in this folder for general guidelines on writing error messages
// Additionally, this code, much like `types/public/config.ts`, is used to generate documentation, so make sure to pass
// your changes by our wonderful docs team before merging!

import type { $ZodError } from 'zod/v4/core';

export interface ErrorData {
	name: string;
	title: string;
	message?: string | ((...params: any) => string);
	hint?: string | ((...params: any) => string);
}

/**
 * @docs
 * @kind heading
 * @name Astro Errors
 */
// Astro Errors, most errors will go here!

/**
 * @docs
 * @message
 * Unknown compiler error.
 * @see
 * - [withastro/compiler issues list](https://astro.build/issues/compiler)
 * @description
 * Astro encountered an unknown error while compiling your files. In most cases, this is not your fault, but an issue in our compiler.
 *
 * If there isn't one already, please [create an issue](https://astro.build/issues/compiler).
 */
export const UnknownCompilerError = {
	name: 'UnknownCompilerError',
	title: 'Unknown compiler error.',
	hint: 'This is almost always a problem with the Astro compiler, not your code. Please open an issue at https://astro.build/issues/compiler.',
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [Official integrations](https://docs.astro.build/en/guides/integrations-guide/#official-integrations)
 * - [Astro.clientAddress](https://docs.astro.build/en/reference/api-reference/#clientaddress)
 * @description
 * The adapter you're using unfortunately does not support `Astro.clientAddress`.
 */
export const ClientAddressNotAvailable = {
	name: 'ClientAddressNotAvailable',
	title: '`Astro.clientAddress` is not available in current adapter.',
	message: (adapterName: string) =>
		`\`Astro.clientAddress\` is not available in the \`${adapterName}\` adapter. File an issue with the adapter to add support.`,
} satisfies ErrorData;
/**
 * @docs
 * @see
 * - [On-demand rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
 * - [Astro.clientAddress](https://docs.astro.build/en/reference/api-reference/#clientaddress)
 * @description
 * The `Astro.clientAddress` property cannot be used inside prerendered routes.
 */
export const PrerenderClientAddressNotAvailable = {
// ... (2040 more lines)

Domain

Subdomains

Functions

Types

Dependencies

  • core

Frequently Asked Questions

What does errors-data.ts do?
errors-data.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in errors-data.ts?
errors-data.ts defines 84 function(s): ActionNotFoundError.message, ActionsReturnedInvalidDataError.message, AdapterSupportOutputMismatch.message, AstroGlobNoMatch.message, AstroGlobUsedOutside.message, CannotDetermineWeightAndStyleFromFontFile.message, CannotExtractFontType.message, CannotFetchFontFile.message, CannotOptimizeSvg.message, ClientAddressNotAvailable.message, and 74 more.
What does errors-data.ts depend on?
errors-data.ts imports 1 module(s): core.
Where is errors-data.ts in the architecture?
errors-data.ts is located at packages/astro/src/core/errors/errors-data.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/core/errors).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free