MCPcopy Index your code
hub / github.com/ginobefun/BestBlogs / exitCodeFor

Function exitCodeFor

cli/src/render/errors.ts:61–71  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

59}
60
61export function exitCodeFor(err: unknown): number {
62 if (err instanceof CliApiError) {
63 if (err.httpStatus === 401 || err.code === 'AUTH_REQUIRED') return 2
64 if (err.httpStatus === 403) return 3
65 if (err.httpStatus === 404) return 4
66 if (err.httpStatus === 429) return 5
67 if (err.httpStatus >= 500) return 6
68 }
69 if (err instanceof CliAuthError) return 2
70 return 1
71}

Callers 10

errors.test.tsFile · 0.85
registerExplainCommandsFunction · 0.85
registerCaptureCommandsFunction · 0.85
registerTopicsCommandsFunction · 0.85
registerBriefCommandsFunction · 0.85
registerDiscoverCommandsFunction · 0.85
registerTrendingCommandFunction · 0.85
registerReadCommandsFunction · 0.85
registerAuthCommandsFunction · 0.85
registerIntakeCommandsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected