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

Function defaultHintForCode

src/kernel/errors.ts:165–188  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

163}
164
165export function defaultHintForCode(code: string): string | undefined {
166 switch (code) {
167 case 'INVALID_ARGS':
168 return 'Check command arguments and run --help for usage examples.';
169 case 'SESSION_NOT_FOUND':
170 return 'Run open first or pass an explicit device selector.';
171 case 'TOOL_MISSING':
172 return 'Install required platform tooling and ensure it is available in PATH.';
173 case 'DEVICE_NOT_FOUND':
174 return 'Verify the target device is booted/connected and selectors match.';
175 case 'APP_NOT_INSTALLED':
176 return 'Run apps to discover the exact installed package or bundle id, or install the app before open.';
177 case 'UNSUPPORTED_OPERATION':
178 return 'This command is not available for the selected platform/device.';
179 case 'NOT_IMPLEMENTED':
180 return 'This command is part of the planned API but is not implemented yet.';
181 case 'COMMAND_FAILED':
182 return 'Retry with --debug and inspect diagnostics log for details.';
183 case 'UNAUTHORIZED':
184 return 'Refresh daemon metadata and retry the command.';
185 default:
186 return 'Retry with --debug and inspect diagnostics log for details.';
187 }
188}

Callers 2

normalizeErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected