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