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

Function asAppError

src/kernel/errors.ts:61–67  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

59}
60
61export function asAppError(err: unknown): AppError {
62 if (err instanceof AppError) return err;
63 if (err instanceof Error) {
64 return new AppError('UNKNOWN', err.message, undefined, err);
65 }
66 return new AppError('UNKNOWN', 'Unknown error', { err });
67}
68
69export function isAgentDeviceError(err: unknown): err is AppError {
70 return err instanceof AppError;

Callers 15

daemon.tsFile · 0.90
runCliFunction · 0.90
cli.tsFile · 0.90
invokeMaestroRunScriptFunction · 0.90
resolveCommandInputFunction · 0.90
reserveCommandOutputFunction · 0.90
createCommandTempFileFunction · 0.90
runBatchFunction · 0.90
toDaemonResponseFunction · 0.90
writeAndroidDevPrefsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected