Home / Function/ actions.handleAction() — astro Function Reference

actions.handleAction() — astro Function Reference

Architecture documentation for the actions.handleAction() function in server.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  29046963_a1ac_27e0_34dd_0e0a8a55f750["actions.handleAction()"]
  8e22779a_aadb_b425_7cff_7b649ae85e50["server.ts"]
  29046963_a1ac_27e0_34dd_0e0a8a55f750 -->|defined in| 8e22779a_aadb_b425_7cff_7b649ae85e50
  style 29046963_a1ac_27e0_34dd_0e0a8a55f750 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/actions/runtime/entrypoints/server.ts lines 26–36

	handleAction: async (param, path, context) => {
		const pipeline: Pipeline | undefined = context
			? Reflect.get(context, pipelineSymbol)
			: undefined;
		if (!pipeline) {
			throw new AstroError(ActionCalledFromServerError);
		}
		const action = await pipeline.getAction(path);
		if (!action) throw new Error(`Action not found: ${path}`);
		return action.bind(context)(param);
	},

Domain

Subdomains

Frequently Asked Questions

What does actions.handleAction() do?
actions.handleAction() is a function in the astro codebase, defined in packages/astro/src/actions/runtime/entrypoints/server.ts.
Where is actions.handleAction() defined?
actions.handleAction() is defined in packages/astro/src/actions/runtime/entrypoints/server.ts at line 26.

Analyze Your Own Codebase

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

Try Supermodel Free