MCPcopy Create free account
hub / github.com/cli/cli / transportCode

Function transportCode

evals/src/core/github.ts:29–35  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

27}
28
29function transportCode(error: unknown): string | undefined {
30 for (const candidate of [error, error instanceof Error ? error.cause : undefined]) {
31 if (typeof candidate === "object" && candidate !== null && "code" in candidate && typeof candidate.code === "string") {
32 return candidate.code;
33 }
34 }
35}
36
37/** A minimal GitHub REST client for fixtures, actors, and snapshots, with retries for transient failures. */
38export class GitHub {

Callers 1

pageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected