MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / runOrSkipOnAuthFailure

Function runOrSkipOnAuthFailure

agents/e2e/base-deep.e2e.test.ts:74–89  ·  view source on GitHub ↗
(
    label: string,
    runner: () => Promise<T>,
  )

Source from the content-addressed store, hash-verified

72 }
73
74 const runOrSkipOnAuthFailure = async <T>(
75 label: string,
76 runner: () => Promise<T>,
77 ): Promise<T | null> => {
78 try {
79 return await runner()
80 } catch (error) {
81 if (!isAuthenticationError(error)) {
82 throw error
83 }
84 console.warn(
85 `${label}: authentication failed for ${API_KEY_ENV_VAR}; skipping base-deep integration test.`,
86 )
87 return null
88 }
89 }
90
91 const sanitizeForPath = (value: string) =>
92 value

Callers 1

Calls 1

isAuthenticationErrorFunction · 0.70

Tested by

no test coverage detected