Class: HttpError
core/errors.HttpError
Represents an error that occurs while invoking an HTTP request to a Large Language Model.
Hierarchy
↳
HttpError
↳↳
OpenAIError
Constructors
constructor
• new HttpError(message
, statusCode
, errorCode
, responseBody?
, responseHeaders?
)
Parameters
Name | Type |
---|---|
message | string |
statusCode | number |
errorCode | number |
responseBody? | string |
responseHeaders? | Record <string , string > |
Overrides
Defined in
packages/ai-jsx/src/core/errors.ts:97
Properties
blame
• Readonly
blame: ErrorBlame
Inherited from
Defined in
packages/ai-jsx/src/core/errors.ts:58
code
• Readonly
code: ErrorCode
Inherited from
Defined in
packages/ai-jsx/src/core/errors.ts:57
errorCode
• Readonly
errorCode: number
Defined in
packages/ai-jsx/src/core/errors.ts:100
metadata
• Readonly
metadata: Jsonifiable
= {}
Inherited from
Defined in
packages/ai-jsx/src/core/errors.ts:59
statusCode
• Readonly
statusCode: number
Defined in
packages/ai-jsx/src/core/errors.ts:99
responseBody
• Optional
Readonly
responseBody: string
Defined in
packages/ai-jsx/src/core/errors.ts:101
responseHeaders
• Optional
Readonly
responseHeaders: Record
<string
, string
>
Defined in
packages/ai-jsx/src/core/errors.ts:102
Methods
toString
▸ toString(): string
Returns
string