MCPcopy Index your code
hub / github.com/callstack/agent-device / toDaemonResponse

Function toDaemonResponse

src/daemon/selector-runtime.ts:489–498  ·  view source on GitHub ↗
(
  task: () => Promise<Record<string, unknown>>,
)

Source from the content-addressed store, hash-verified

487}
488
489async function toDaemonResponse(
490 task: () => Promise<Record<string, unknown>>,
491): Promise<DaemonResponse> {
492 try {
493 return { ok: true, data: await task() };
494 } catch (error) {
495 const appError = asAppError(error);
496 return errorResponse(appError.code, appError.message, appError.details);
497 }
498}
499
500async function maybeAndroidForegroundBlockerResponse(
501 params: SelectorRuntimeParams,

Callers 4

dispatchGetViaRuntimeFunction · 0.85
dispatchIsViaRuntimeFunction · 0.85
executeFunction · 0.85

Calls 2

asAppErrorFunction · 0.90
errorResponseFunction · 0.90

Tested by

no test coverage detected