deserializeActionResult() — astro Function Reference
Architecture documentation for the deserializeActionResult() function in client.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 576b7ff0_042b_5a8f_4dd0_3108a98a0d61["deserializeActionResult()"] eb04bc4a_f415_2ce3_c34b_e7ef77fb812f["client.ts"] 576b7ff0_042b_5a8f_4dd0_3108a98a0d61 -->|defined in| eb04bc4a_f415_2ce3_c34b_e7ef77fb812f e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b["fromJson()"] 576b7ff0_042b_5a8f_4dd0_3108a98a0d61 -->|calls| e3aecf4e_cdde_b1e2_a818_1ca7565dbc4b style 576b7ff0_042b_5a8f_4dd0_3108a98a0d61 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/actions/runtime/client.ts lines 155–189
export function deserializeActionResult(res: SerializedActionResult): SafeResult<any, any> {
if (res.type === 'error') {
let json;
try {
json = JSON.parse(res.body);
} catch {
return {
data: undefined,
error: new ActionError({
message: res.body,
code: 'INTERNAL_SERVER_ERROR',
}),
};
}
if (import.meta.env?.PROD) {
return { error: ActionError.fromJson(json), data: undefined };
} else {
const error = ActionError.fromJson(json);
error.stack = actionResultErrorStack.get();
return {
error,
data: undefined,
};
}
}
if (res.type === 'empty') {
return { data: undefined, error: undefined };
}
return {
data: devalueParse(res.body, {
URL: (href) => new URL(href),
}),
error: undefined,
};
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does deserializeActionResult() do?
deserializeActionResult() is a function in the astro codebase, defined in packages/astro/src/actions/runtime/client.ts.
Where is deserializeActionResult() defined?
deserializeActionResult() is defined in packages/astro/src/actions/runtime/client.ts at line 155.
What does deserializeActionResult() call?
deserializeActionResult() calls 1 function(s): fromJson.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free