Home / Function/ formatConfigErrorMessage() — astro Function Reference

formatConfigErrorMessage() — astro Function Reference

Architecture documentation for the formatConfigErrorMessage() function in messages.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  57b26930_938a_68b7_88ac_6afa0fec30cf["formatConfigErrorMessage()"]
  a89de736_d85a_fc8a_68a9_5d9ea54128d5["messages.ts"]
  57b26930_938a_68b7_88ac_6afa0fec30cf -->|defined in| a89de736_d85a_fc8a_68a9_5d9ea54128d5
  style 57b26930_938a_68b7_88ac_6afa0fec30cf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/messages.ts lines 214–227

export function formatConfigErrorMessage(err: $ZodError) {
	const errorList = err.issues.map((issue) =>
		`! ${renderErrorMarkdown(issue.message, 'cli')}`
			// Make text wrapped in backticks blue.
			.replaceAll(codeRegex, blue('$1'))
			// Make the first line red and indent the rest.
			.split('\n')
			.map((line, index) => (index === 0 ? red(line) : '  ' + line))
			.join('\n'),
	);
	return `${red('[config]')} Astro found issue(s) with your configuration:\n\n${errorList.join(
		'\n\n',
	)}`;
}

Domain

Subdomains

Frequently Asked Questions

What does formatConfigErrorMessage() do?
formatConfigErrorMessage() is a function in the astro codebase, defined in packages/astro/src/core/messages.ts.
Where is formatConfigErrorMessage() defined?
formatConfigErrorMessage() is defined in packages/astro/src/core/messages.ts at line 214.

Analyze Your Own Codebase

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

Try Supermodel Free