Home / Function/ fromJson() — astro Function Reference

fromJson() — astro Function Reference

Architecture documentation for the fromJson() function in client.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b["fromJson()"]
  b25f7aa2_e0f4_d431_a5e0_18397089a2ab["ActionError"]
  e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b -->|defined in| b25f7aa2_e0f4_d431_a5e0_18397089a2ab
  576b7ff0_042b_5a8f_4dd0_3108a98a0d61["deserializeActionResult()"]
  576b7ff0_042b_5a8f_4dd0_3108a98a0d61 -->|calls| e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b
  2e952e49_a89b_6f3a_62c0_f5d157cd75c8["isInputError()"]
  e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b -->|calls| 2e952e49_a89b_6f3a_62c0_f5d157cd75c8
  cf031106_a844_88c0_1a26_9116a36624d8["isActionError()"]
  e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b -->|calls| cf031106_a844_88c0_1a26_9116a36624d8
  style e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/actions/runtime/client.ts lines 89–99

	static fromJson(body: any) {
		if (isInputError(body)) {
			return new ActionInputError(body.issues);
		}
		if (isActionError(body)) {
			return new ActionError(body);
		}
		return new ActionError({
			code: 'INTERNAL_SERVER_ERROR',
		});
	}

Domain

Subdomains

Frequently Asked Questions

What does fromJson() do?
fromJson() is a function in the astro codebase, defined in packages/astro/src/actions/runtime/client.ts.
Where is fromJson() defined?
fromJson() is defined in packages/astro/src/actions/runtime/client.ts at line 89.
What does fromJson() call?
fromJson() calls 2 function(s): isActionError, isInputError.
What calls fromJson()?
fromJson() is called by 1 function(s): deserializeActionResult.

Analyze Your Own Codebase

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

Try Supermodel Free