import { AbadgeApiError } from "@abadge/sdk";
class AbadgeApiError extends Error {
readonly statusCode: number; // HTTP status code
readonly code: ErrorCode | string; // e.g. "PERMISSION_DENIED"
readonly message: string; // Human-readable description (inherited from Error)
readonly hint?: string; // Actionable next step, if provided
readonly meta?: Readonly<Record<string, unknown>>; // Structured context for clients
readonly issues?: ReadonlyArray< // VALIDATION_ERROR only
{ path: (string | number)[]; message: string }
>;
static fromResponse(res: Response, fallback: string): Promise<AbadgeApiError>;
static fromUnknown(error: unknown, fallback: string): AbadgeApiError;
}