recordServerError() — astro Function Reference
Architecture documentation for the recordServerError() function in error.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0587760d_4038_cc75_b7f1_065449305ca3["recordServerError()"] 40343022_932a_3e00_df86_950e17dfc4f7["error.ts"] 0587760d_4038_cc75_b7f1_065449305ca3 -->|defined in| 40343022_932a_3e00_df86_950e17dfc4f7 style 0587760d_4038_cc75_b7f1_065449305ca3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/vite-plugin-astro-server/error.ts lines 7–27
export function recordServerError(
loader: ModuleLoader,
manifest: SSRManifest,
logger: Logger,
err: Error,
) {
// This could be a runtime error from Vite's SSR module, so try to fix it here
try {
loader.fixStacktrace(err);
} catch {}
// This is our last line of defense regarding errors where we still might have some information about the request
// Our error should already be complete, but let's try to add a bit more through some guesswork
const errorWithMetadata = collectErrorMetadata(err, manifest.rootDir);
logger.error(null, formatErrorMessage(errorWithMetadata, logger.level() === 'debug'));
return {
errorWithMetadata,
};
}
Domain
Subdomains
Source
Frequently Asked Questions
What does recordServerError() do?
recordServerError() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-astro-server/error.ts.
Where is recordServerError() defined?
recordServerError() is defined in packages/astro/src/vite-plugin-astro-server/error.ts at line 7.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free