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

Function queryDirectIosSelectorOrFallback

src/daemon/selector-runtime.ts:375–386  ·  view source on GitHub ↗
(
  params: SelectorRuntimeParams,
  session: SessionState,
  selector: DirectIosSelectorTarget,
)

Source from the content-addressed store, hash-verified

373}
374
375async function queryDirectIosSelectorOrFallback(
376 params: SelectorRuntimeParams,
377 session: SessionState,
378 selector: DirectIosSelectorTarget,
379): Promise<DirectIosSelectorFallbackResult> {
380 try {
381 return await queryDirectIosSelector(params, session, selector);
382 } catch (error) {
383 if (isDirectIosSelectorFallbackError(error, { allowElementNotFound: true })) return null;
384 return { kind: 'error', response: { ok: false, error: normalizeError(error) } };
385 }
386}
387
388function isDirectIosSelectorErrorResult(
389 result: DirectIosSelectorFallbackResult | ResolvedDirectIosSelectorQuery,

Calls 3

normalizeErrorFunction · 0.90
queryDirectIosSelectorFunction · 0.85

Tested by

no test coverage detected