MCPcopy Create free account
hub / github.com/cursor/community-plugins / handleServerError

Function handleServerError

apps/cursor/src/actions/safe-action.ts:13–21  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

11// Base client.
12export const actionClient = createSafeActionClient({
13 handleServerError(e) {
14 console.error("Action error:", e.message);
15
16 if (e instanceof ActionError) {
17 return e.message;
18 }
19
20 return DEFAULT_SERVER_ERROR_MESSAGE;
21 },
22 defineMetadataSchema() {
23 return z.object({
24 actionName: z.string(),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected