/** @module DiscordHTTPError */ import type { RESTMethod } from "../Constants"; import type { JSONDiscordHTTPError } from "../types/json"; import type { Headers, Response } from "undici"; /** An HTTP error received from Discord. */ export default class DiscordHTTPError extends Error { method: RESTMethod; name: string; resBody: Record | null; response: Response; constructor(res: Response, resBody: unknown | null, method: RESTMethod, stack?: string); static flattenErrors(errors: Record, keyPrefix?: string): Array; get headers(): Headers; get path(): string; get status(): number; get statusText(): string; toJSON(): JSONDiscordHTTPError; }