Home / Class/ AggregateError Class — astro Architecture

AggregateError Class — astro Architecture

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

Entity Profile

Dependency Diagram

graph TD
  aee43c05_1562_793a_45a0_f2d0db7cb963["AggregateError"]
  6040eeed_628d_7649_3de3_370870542dad["errors.ts"]
  aee43c05_1562_793a_45a0_f2d0db7cb963 -->|defined in| 6040eeed_628d_7649_3de3_370870542dad
  fed4db4f_bbc6_25ee_5ab6_6d9c0f80241a["constructor()"]
  aee43c05_1562_793a_45a0_f2d0db7cb963 -->|method| fed4db4f_bbc6_25ee_5ab6_6d9c0f80241a
  5aaf805b_3dea_67f2_902d_ea0e8a86e5cd["is()"]
  aee43c05_1562_793a_45a0_f2d0db7cb963 -->|method| 5aaf805b_3dea_67f2_902d_ea0e8a86e5cd

Relationship Graph

Source Code

packages/astro/src/core/errors/errors.ts lines 117–132

export class AggregateError extends AstroError {
	type: ErrorTypes = 'AggregateError';
	errors: AstroError[];

	// Despite being a collection of errors, AggregateError still needs to have a main error attached to it
	// This is because Vite expects every thrown errors handled during HMR to be, well, Error and have a message
	constructor(props: ErrorProperties & { errors: AstroError[] }, options?: ErrorOptions) {
		super(props, options);

		this.errors = props.errors;
	}

	static is(err: unknown): err is AggregateError {
		return (err as AggregateError)?.type === 'AggregateError';
	}
}

Domain

Frequently Asked Questions

What is the AggregateError class?
AggregateError is a class in the astro codebase, defined in packages/astro/src/core/errors/errors.ts.
Where is AggregateError defined?
AggregateError is defined in packages/astro/src/core/errors/errors.ts at line 117.

Analyze Your Own Codebase

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

Try Supermodel Free