Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/error.ts>APIError

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
class APIError
extends OpenAIError
import { APIError } from "https://deno.land/x/openai@v4.61.1/error.ts";

Constructors

new
APIError(
status: number | undefined,
error: Object | undefined,
message: string | undefined,
headers: Headers | undefined,
)

Properties

readonly
code: string | null | undefined
readonly
error: Object | undefined
readonly
headers: Headers | undefined
readonly
param: string | null | undefined
readonly
request_id: string | null | undefined
readonly
status: number | undefined
readonly
type: string | undefined

Static Methods

private
makeMessage(
status: number | undefined,
error: any,
message: string | undefined,
)
generate(
status: number | undefined,
errorResponse: Object | undefined,
message: string | undefined,
headers: Headers | undefined,
)