Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

OpenAiError unstable

OpenAI error metadata augmentation.

Provides OpenAI-specific metadata fields for AI error types through module augmentation, enabling typed access to OpenAI error details.

2 exports Since v4.0.0 Source

Models

OpenAiErrorMetadata

type unstable
Since v4.0.0

OpenAI-specific error metadata fields.

Signature

type OpenAiErrorMetadata = {
readonly errorCode: string | null;
readonly errorType: string | null;
readonly requestId: string | null;
}
Since v4.0.0

OpenAI-specific rate limit metadata fields.

Details

Extends base error metadata with rate limit specific information from OpenAI's rate limit headers.

Signature

type OpenAiRateLimitMetadata = OpenAiErrorMetadata & {
readonly limit: string | null;
readonly remaining: number | null;
readonly resetRequests: string | null;
readonly resetTokens: string | null;
}