MCPcopy Create free account
hub / github.com/apache/maka / classifyConnectionTestError

Function classifyConnectionTestError

packages/runtime/src/test-connection.ts:486–495  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

484}
485
486function classifyConnectionTestError(error: unknown): ConnectionEffectError {
487 if (error instanceof ConnectionEffectFetchError) return { kind: error.kind };
488 if (error instanceof ConnectionEffectHttpError) {
489 return classifyConnectionEffectStatus(error.status);
490 }
491 if (error instanceof ConnectionEffectInvalidResponseError || error instanceof SyntaxError) {
492 return { kind: 'invalid_response' };
493 }
494 return { kind: 'unknown' };
495}
496
497function classifyConnectionTestResult(result: ConnectionTestResult): ConnectionEffectError {
498 if (result.statusCode !== undefined) {

Callers 1

runConnectionTestEffectFunction · 0.85

Calls 1

Tested by

no test coverage detected