export type ErrorCode = 'CONFIG_ERROR' | 'GITLAB_API_ERROR' | 'GITHUB_API_ERROR' | 'GIT_ERROR' | 'REVIEWER_ERROR' | 'PARSE_ERROR' | 'RUNTIME_ERROR'; export interface GitlabReviewErrorOptions extends ErrorOptions { code: ErrorCode; hint?: string; /** * Marks a deadline-exceeded failure. The CLI's `code` taxonomy stays coarse * (one code per subsystem), so timeouts are flagged here rather than via a * separate code; the OTel bridge reads it to label runs `status=timeout`. */ timeout?: boolean; /** * Marks a provider credit/quota-exhaustion failure (e.g. HTTP 402). The review * could not run for reasons outside the MR's control, so the CLI treats it as * a non-fatal skip (warn, exit 0) rather than failing the pipeline. */ quotaExceeded?: boolean; } export declare class GitlabReviewError extends Error { readonly code: ErrorCode; readonly hint?: string; readonly timeout: boolean; readonly quotaExceeded: boolean; constructor(message: string, options: GitlabReviewErrorOptions); } /** True when `message` looks like a provider credit/quota-exhaustion error. */ export declare function isQuotaExceededMessage(message: string | undefined): boolean; /** True when `error` is (or reports) a provider credit/quota-exhaustion failure. */ export declare function isQuotaExceededError(error: unknown): boolean; export declare class ConfigError extends GitlabReviewError { constructor(message: string, options?: Omit); } export declare class GitLabApiError extends GitlabReviewError { readonly method: string; readonly path: string; readonly status?: number; readonly responseBody?: string; constructor(message: string, options: Omit & { method: string; path: string; status?: number; responseBody?: string; }); } export declare class GitHubApiError extends GitlabReviewError { readonly method: string; readonly path: string; readonly status?: number; readonly responseBody?: string; constructor(message: string, options: Omit & { method: string; path: string; status?: number; responseBody?: string; }); } export declare class GitError extends GitlabReviewError { constructor(message: string, options?: Omit); } export declare class ReviewerError extends GitlabReviewError { constructor(message: string, options?: Omit); } export declare class ParseError extends GitlabReviewError { constructor(message: string, options?: Omit); } export declare class RuntimeError extends GitlabReviewError { constructor(message: string, options?: Omit); } export declare function formatError(error: unknown): string; //# sourceMappingURL=errors.d.ts.map