/
githubmirror
/
ydb-nodejs-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-nodejs-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
third-parties/langchain/src/errors.ts
42 строки
1 KB
Vladislav Polyakov
Refactor @ydbjs/langchain internals for correctness and ergonomics
01 июн 2026, 18:50
01 июн 2026, 18:50
7f51e7c
Код
Авторство
О чём код?
/** * Base class for every error thrown by `@ydbjs/langchain`. Catch this to * separate store errors from framework errors at the LangChain layer. */ export class YDBVectorStoreError extends Error { constructor(msg: string) { super(msg) this.name = 'YDBVectorStoreError' } } /** * Constructor-time configuration is invalid (bad connection params, unknown * strategy, out-of-range tuning options, misuse of static helpers, …). */ export class YDBVectorStoreConfigError extends YDBVectorStoreError { constructor(msg: string) { super(msg) this.name = 'YDBVectorStoreConfigError' } } /** * Call-time argument is invalid (vector/document count mismatch, negative `k`, …). */ export class YDBVectorStoreArgumentError extends YDBVectorStoreError { constructor(msg: string) { super(msg) this.name = 'YDBVectorStoreArgumentError' } } /** * Operation cannot run in the current store state (filter combined with index, * `createVectorIndex` without `indexEnabled` / `indexVectorDimension`, …). */ export class YDBVectorStoreOperationError extends YDBVectorStoreError { constructor(msg: string) { super(msg) this.name = 'YDBVectorStoreOperationError' } }