eventError() — astro Function Reference
Architecture documentation for the eventError() function in error.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 631b6819_275c_cd3e_e724_2bb6eb5bb160["eventError()"] 2bf4188d_3294_32f2_7216_e6a2a60569ef["error.ts"] 631b6819_275c_cd3e_e724_2bb6eb5bb160 -->|defined in| 2bf4188d_3294_32f2_7216_e6a2a60569ef b67009d2_5e75_6ab7_6873_01b18a5a3c32["getSafeErrorMessage()"] 631b6819_275c_cd3e_e724_2bb6eb5bb160 -->|calls| b67009d2_5e75_6ab7_6873_01b18a5a3c32 1c1a73a4_1450_b3e3_719c_cc080949d155["anonymizeErrorMessage()"] 631b6819_275c_cd3e_e724_2bb6eb5bb160 -->|calls| 1c1a73a4_1450_b3e3_719c_cc080949d155 style 631b6819_275c_cd3e_e724_2bb6eb5bb160 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/events/error.ts lines 57–80
export function eventError({
cmd,
err,
isFatal,
}: {
err: ErrorWithMetadata;
cmd: string;
isFatal: boolean;
}): { eventName: string; payload: ErrorEventPayload }[] {
const errorData =
AstroError.is(err) && (AstroErrorData[err.name as keyof typeof AstroErrorData] as ErrorData);
const payload: ErrorEventPayload = {
name: err.name,
plugin: err.plugin,
cliCommand: cmd,
isFatal: isFatal,
anonymousMessageHint:
errorData && errorData.message
? getSafeErrorMessage(errorData.message)
: anonymizeErrorMessage(err.message),
};
return [{ eventName: EVENT_ERROR, payload }];
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does eventError() do?
eventError() is a function in the astro codebase, defined in packages/astro/src/events/error.ts.
Where is eventError() defined?
eventError() is defined in packages/astro/src/events/error.ts at line 57.
What does eventError() call?
eventError() calls 2 function(s): anonymizeErrorMessage, getSafeErrorMessage.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free