Are you an LLM? You can read better optimized documentation at /api/@nhtio/adk/batteries/embeddings/openai/exceptions.md for this page in Markdown format
@nhtio/adk/batteries/embeddings/openai/exceptions
Battery-scoped exception constructors for OpenAI Embeddings adapter failures.
Remarks
Battery-scoped exception classes for the OpenAI Embeddings adapter. These exceptions are owned by the battery (not the ADK core) and are minted via createException from @nhtio/adk/factories. Re-exported from the battery's barrel.
The categories mirror the WebLLM Embeddings battery one-to-one so the two batteries fail with parallel semantics — only the engine-specific transport exception differs.
Variables
| Variable | Description |
|---|---|
| E_INVALID_OPENAI_EMBEDDINGS_OPTIONS | Thrown when the resolved adapter options fail validation against openAIEmbeddingsOptionsSchema — e.g. a missing/empty model, or an unknown option key. Fatal: config bugs fail loud at construction time, not at embed time. |
| E_OPENAI_EMBEDDINGS_HTTP_ERROR | Thrown when the upstream /v1/embeddings endpoint returns a non-2xx response (after retries are exhausted), or the transport throws. Non-fatal. Printf args: [status, detail] — status is 0 for a transport-level failure with no HTTP response. |
| E_OPENAI_EMBEDDINGS_MALFORMED_RESPONSE | Thrown when a 2xx response body cannot be parsed into the expected { data: [{ embedding: number[] }] } shape (malformed JSON, missing data, wrong vector count). Non-fatal. Printf arg: [detail]. |
| E_OPENAI_EMBEDDINGS_REQUEST_TIMEOUT | Thrown when the request handshake does not complete before requestTimeoutMs (and retries are exhausted). Non-fatal. Printf arg: [requestTimeoutMs]. |