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

Class ApiError

evals/src/core/github.ts:23–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22/** A GitHub REST API error response. */
23export class ApiError extends Error {
24 constructor(readonly status: number, method: string, path: string, message: string, readonly retryAfterMs?: number) {
25 super(`GitHub ${method} ${path}: HTTP ${status}: ${message}`);
26 }
27}
28
29function transportCode(error: unknown): string | undefined {
30 for (const candidate of [error, error instanceof Error ? error.cause : undefined]) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected