{"version":3,"file":"exceptions.mjs","names":[],"sources":["../../../../src/batteries/embeddings/webllm/exceptions.ts"],"sourcesContent":["/**\n * Battery-scoped exception constructors for WebLLM Embeddings adapter failures.\n *\n * @module @nhtio/adk/batteries/embeddings/webllm/exceptions\n *\n * @remarks\n * Battery-scoped exception classes for the WebLLM Embeddings adapter, minted via `createException`\n * from `@nhtio/adk/factories`. The categories mirror the OpenAI Embeddings battery one-to-one —\n * only the engine-specific failure exception differs (engine error vs HTTP error).\n */\n\nimport { createException } from '@nhtio/adk/factories'\n\n/**\n * Thrown when the resolved adapter options fail validation against\n * `webLLMEmbeddingsOptionsSchema` — e.g. a missing/empty `model`, an unknown option key, or no\n * WebGPU support in the current runtime. Fatal: config bugs fail loud, not at embed time.\n */\nexport const E_INVALID_WEBLLM_EMBEDDINGS_OPTIONS = createException<[string]>(\n  'E_INVALID_WEBLLM_EMBEDDINGS_OPTIONS',\n  'Invalid WebLLM Embeddings adapter options: %s',\n  'E_INVALID_WEBLLM_EMBEDDINGS_OPTIONS',\n  529,\n  true\n)\n\n/**\n * Thrown when the WebLLM engine fails to load or `engine.embeddings.create()` throws/returns a\n * malformed result. Non-fatal. Printf arg: `[detail]`.\n */\nexport const E_WEBLLM_EMBEDDINGS_ENGINE_ERROR = createException<[string]>(\n  'E_WEBLLM_EMBEDDINGS_ENGINE_ERROR',\n  'WebLLM Embeddings engine error: %s',\n  'E_WEBLLM_EMBEDDINGS_ENGINE_ERROR',\n  502,\n  false\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAa,sCAAsC,gBACjD,uCACA,iDACA,uCACA,KACA,IACF;;;;;AAMA,IAAa,mCAAmC,gBAC9C,oCACA,sCACA,oCACA,KACA,KACF"}