MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / buildStopFailure

Function buildStopFailure

src/utils/app-lifecycle-results.ts:143–167  ·  view source on GitHub ↗
(
  artifacts: StopResultArtifacts,
  message: string,
  diagnosticErrors: StopResultDiagnosticMessage[] = [],
)

Source from the content-addressed store, hash-verified

141}
142
143export function buildStopFailure(
144 artifacts: StopResultArtifacts,
145 message: string,
146 diagnosticErrors: StopResultDiagnosticMessage[] = [],
147): StopResultDomainResult {
148 const diagnosticMessage = stripKnownPrefix(message, [
149 'Failed to stop app:',
150 'Failed to stop app on device:',
151 'Stop app in simulator operation failed:',
152 'Stop macOS app operation failed:',
153 ]);
154 const diagnostics =
155 diagnosticErrors.length > 0
156 ? { warnings: [], errors: diagnosticErrors }
157 : createBasicDiagnostics({ errors: [diagnosticMessage] });
158
159 return {
160 kind: 'stop-result',
161 didError: true,
162 error: isMacStop(artifacts) ? 'Failed to stop macOS app.' : 'Failed to stop app.',
163 summary: { status: 'FAILED' },
164 artifacts,
165 diagnostics,
166 };
167}
168
169export function setStopResultStructuredOutput(
170 ctx: ToolHandlerContext,

Callers 4

createStopMacAppExecutorFunction · 0.90
createStopAppSimExecutorFunction · 0.90
stop_app_simLogicFunction · 0.90

Calls 3

createBasicDiagnosticsFunction · 0.90
stripKnownPrefixFunction · 0.85
isMacStopFunction · 0.85

Tested by

no test coverage detected