MCPcopy Create free account
hub / github.com/codeaashu/claude-code / constructor

Method constructor

web/lib/api/types.ts:47–56  ·  view source on GitHub ↗
(
    public readonly status: number,
    message: string,
    public readonly type: ApiErrorType = "server",
    /** Retry-After seconds for rate limit errors */
    public readonly retryAfterMs?: number
  )

Source from the content-addressed store, hash-verified

45
46export class ApiError extends Error {
47 constructor(
48 public readonly status: number,
49 message: string,
50 public readonly type: ApiErrorType = "server",
51 /** Retry-After seconds for rate limit errors */
52 public readonly retryAfterMs?: number
53 ) {
54 super(message);
55 this.name = "ApiError";
56 }
57
58 get isRetryable(): boolean {
59 return this.type === "network" || this.type === "server" || this.status >= 500;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected