Skip to main content

Class: HttpError

core/errors.HttpError

Represents an error that occurs while invoking an HTTP request to a Large Language Model.

Hierarchy

Constructors

constructor

new HttpError(message, statusCode, errorCode, responseBody?, responseHeaders?)

Parameters

NameType
messagestring
statusCodenumber
errorCodenumber
responseBody?string
responseHeaders?Record<string, string>

Overrides

AIJSXError.constructor

Defined in

packages/ai-jsx/src/core/errors.ts:108

Properties

blame

Readonly blame: ErrorBlame

Inherited from

AIJSXError.blame

Defined in

packages/ai-jsx/src/core/errors.ts:69


code

Readonly code: ErrorCode

Inherited from

AIJSXError.code

Defined in

packages/ai-jsx/src/core/errors.ts:68


errorCode

Readonly errorCode: number

Defined in

packages/ai-jsx/src/core/errors.ts:111


metadata

Readonly metadata: Jsonifiable = {}

Inherited from

AIJSXError.metadata

Defined in

packages/ai-jsx/src/core/errors.ts:70


statusCode

Readonly statusCode: number

Defined in

packages/ai-jsx/src/core/errors.ts:110


responseBody

Optional Readonly responseBody: string

Defined in

packages/ai-jsx/src/core/errors.ts:112


responseHeaders

Optional Readonly responseHeaders: Record<string, string>

Defined in

packages/ai-jsx/src/core/errors.ts:113

Methods

toString

toString(): string

Returns

string

Inherited from

AIJSXError.toString

Defined in

packages/ai-jsx/src/core/errors.ts:92