Home / Function/ clearRouteError() — astro Function Reference

clearRouteError() — astro Function Reference

Architecture documentation for the clearRouteError() function in server-state.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  cdaabae0_324f_8e83_83d4_bd18da2d7d2e["clearRouteError()"]
  812671e7_93e2_bcef_6639_81cea313e4a8["server-state.ts"]
  cdaabae0_324f_8e83_83d4_bd18da2d7d2e -->|defined in| 812671e7_93e2_bcef_6639_81cea313e4a8
  style cdaabae0_324f_8e83_83d4_bd18da2d7d2e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/vite-plugin-astro-server/server-state.ts lines 46–52

export function clearRouteError(serverState: ServerState, pathname: string) {
	if (serverState.routes.has(pathname)) {
		serverState.routes.delete(pathname);
	}
	serverState.state = 'fresh';
	serverState.error = undefined;
}

Domain

Subdomains

Frequently Asked Questions

What does clearRouteError() do?
clearRouteError() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-astro-server/server-state.ts.
Where is clearRouteError() defined?
clearRouteError() is defined in packages/astro/src/vite-plugin-astro-server/server-state.ts at line 46.

Analyze Your Own Codebase

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

Try Supermodel Free