MCPcopy Index your code
hub / github.com/coder/mux / hasErrorCode

Function hasErrorCode

src/node/services/tools/skillFileUtils.ts:13–20  ·  view source on GitHub ↗
(error: unknown, code: string)

Source from the content-addressed store, hash-verified

11 * For runtime-aware containment, use `runtimeSkillPathUtils.ts` instead.
12 */
13export function hasErrorCode(error: unknown, code: string): boolean {
14 return (
15 error != null &&
16 typeof error === "object" &&
17 "code" in error &&
18 (error as { code?: unknown }).code === code
19 );
20}
21
22export function isAbsolutePathAny(filePath: string): boolean {
23 if (filePath.startsWith("/") || filePath.startsWith("\\")) {

Callers 10

readSkillDescriptorFunction · 0.90
discoverAgentSkillsFunction · 0.90
readAgentSkillFunction · 0.90
hasLocalGitmodulesFunction · 0.90
lstatIfExistsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected