MCPcopy
hub / github.com/callstack/agent-device / errorResponse

Function errorResponse

src/daemon/handlers/response.ts:9–18  ·  view source on GitHub ↗
(
  code: string,
  message: string,
  details?: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

7export const NO_ACTIVE_SESSION_MESSAGE = 'No active session. Run open first.';
8
9export function errorResponse(
10 code: string,
11 message: string,
12 details?: Record<string, unknown>,
13): DaemonFailureResponse {
14 return {
15 ok: false,
16 error: { code, message, ...(details ? { details } : {}) },
17 };
18}
19
20/**
21 * Shared "No active session. Run open first." failure used by handlers that require

Callers 15

dispatchGetViaRuntimeFunction · 0.90
dispatchIsViaRuntimeFunction · 0.90
dispatchWaitViaRuntimeFunction · 0.90
parseGetTargetFunction · 0.90
toDaemonResponseFunction · 0.90
runReplayTestSuiteFunction · 0.90
parseReactNativeArgsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected