Home / Class/ LiveCollectionValidationError Class — astro Architecture

LiveCollectionValidationError Class — astro Architecture

Architecture documentation for the LiveCollectionValidationError class in errors.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  326d2252_2e66_f4ae_847f_128b4c059da2["LiveCollectionValidationError"]
  244bd8fe_4d6f_01c4_922b_3ce9b01593be["errors.ts"]
  326d2252_2e66_f4ae_847f_128b4c059da2 -->|defined in| 244bd8fe_4d6f_01c4_922b_3ce9b01593be
  decf500d_3746_2ab0_cffd_4294264482ce["constructor()"]
  326d2252_2e66_f4ae_847f_128b4c059da2 -->|method| decf500d_3746_2ab0_cffd_4294264482ce
  9f53370a_c574_de1a_9c8d_98c08fdaae19["is()"]
  326d2252_2e66_f4ae_847f_128b4c059da2 -->|method| 9f53370a_c574_de1a_9c8d_98c08fdaae19

Relationship Graph

Source Code

packages/astro/src/content/loaders/errors.ts lines 37–52

export class LiveCollectionValidationError extends LiveCollectionError {
	constructor(collection: string, entryId: string, error: z.$ZodError) {
		super(
			collection,
			[
				`**${collection} → ${entryId}** data does not match the collection schema.\n`,
				...formatZodError(error),
				'',
			].join('\n'),
		);
		this.name = 'LiveCollectionValidationError';
	}
	static is(error: unknown): error is LiveCollectionValidationError {
		return (error as any)?.name === 'LiveCollectionValidationError';
	}
}

Frequently Asked Questions

What is the LiveCollectionValidationError class?
LiveCollectionValidationError is a class in the astro codebase, defined in packages/astro/src/content/loaders/errors.ts.
Where is LiveCollectionValidationError defined?
LiveCollectionValidationError is defined in packages/astro/src/content/loaders/errors.ts at line 37.

Analyze Your Own Codebase

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

Try Supermodel Free