(error: unknown)
| 27 | } |
| 28 | |
| 29 | function 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. */ |
| 38 | export class GitHub { |