rag-lite-ts 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -5
- package/dist/{cli → cjs/cli}/indexer.js +73 -15
- package/dist/cjs/cli/ui-server.d.ts +5 -0
- package/dist/cjs/cli/ui-server.js +152 -0
- package/dist/{cli.js → cjs/cli.js} +25 -6
- package/dist/{core → cjs/core}/binary-index-format.js +6 -3
- package/dist/{core → cjs/core}/db.d.ts +56 -0
- package/dist/{core → cjs/core}/db.js +105 -0
- package/dist/{core → cjs/core}/ingestion.js +3 -0
- package/dist/cjs/core/knowledge-base-manager.d.ts +109 -0
- package/dist/cjs/core/knowledge-base-manager.js +256 -0
- package/dist/{core → cjs/core}/model-validator.js +1 -1
- package/dist/{core → cjs/core}/search-pipeline.js +1 -1
- package/dist/{core → cjs/core}/search.js +1 -1
- package/dist/cjs/core/vector-index-messages.d.ts +52 -0
- package/dist/cjs/core/vector-index-messages.js +5 -0
- package/dist/cjs/core/vector-index-worker.d.ts +6 -0
- package/dist/cjs/core/vector-index-worker.js +304 -0
- package/dist/cjs/core/vector-index.d.ts +107 -0
- package/dist/cjs/core/vector-index.js +344 -0
- package/dist/{factories → cjs/factories}/ingestion-factory.js +3 -7
- package/dist/{factories → cjs/factories}/search-factory.js +11 -0
- package/dist/{index-manager.d.ts → cjs/index-manager.d.ts} +23 -3
- package/dist/{index-manager.js → cjs/index-manager.js} +84 -15
- package/dist/{index.d.ts → cjs/index.d.ts} +2 -1
- package/dist/{index.js → cjs/index.js} +3 -1
- package/dist/esm/api-errors.d.ts +90 -0
- package/dist/esm/api-errors.js +320 -0
- package/dist/esm/cli/indexer.d.ts +11 -0
- package/dist/esm/cli/indexer.js +529 -0
- package/dist/esm/cli/search.d.ts +7 -0
- package/dist/esm/cli/search.js +332 -0
- package/dist/esm/cli/ui-server.d.ts +5 -0
- package/dist/esm/cli/ui-server.js +152 -0
- package/dist/esm/cli.d.ts +3 -0
- package/dist/esm/cli.js +548 -0
- package/dist/esm/config.d.ts +51 -0
- package/dist/esm/config.js +79 -0
- package/dist/esm/core/abstract-embedder.d.ts +125 -0
- package/dist/esm/core/abstract-embedder.js +264 -0
- package/dist/esm/core/actionable-error-messages.d.ts +60 -0
- package/dist/esm/core/actionable-error-messages.js +397 -0
- package/dist/esm/core/adapters.d.ts +93 -0
- package/dist/esm/core/adapters.js +139 -0
- package/dist/esm/core/batch-processing-optimizer.d.ts +155 -0
- package/dist/esm/core/batch-processing-optimizer.js +536 -0
- package/dist/esm/core/binary-index-format.d.ts +78 -0
- package/dist/esm/core/binary-index-format.js +294 -0
- package/dist/esm/core/chunker.d.ts +119 -0
- package/dist/esm/core/chunker.js +73 -0
- package/dist/esm/core/cli-database-utils.d.ts +53 -0
- package/dist/esm/core/cli-database-utils.js +239 -0
- package/dist/esm/core/config.d.ts +102 -0
- package/dist/esm/core/config.js +247 -0
- package/dist/esm/core/content-errors.d.ts +111 -0
- package/dist/esm/core/content-errors.js +362 -0
- package/dist/esm/core/content-manager.d.ts +335 -0
- package/dist/esm/core/content-manager.js +1476 -0
- package/dist/esm/core/content-performance-optimizer.d.ts +150 -0
- package/dist/esm/core/content-performance-optimizer.js +516 -0
- package/dist/esm/core/content-resolver.d.ts +104 -0
- package/dist/esm/core/content-resolver.js +285 -0
- package/dist/esm/core/cross-modal-search.d.ts +164 -0
- package/dist/esm/core/cross-modal-search.js +342 -0
- package/dist/esm/core/database-connection-manager.d.ts +109 -0
- package/dist/esm/core/database-connection-manager.js +310 -0
- package/dist/esm/core/db.d.ts +269 -0
- package/dist/esm/core/db.js +1000 -0
- package/dist/esm/core/embedder-factory.d.ts +154 -0
- package/dist/esm/core/embedder-factory.js +311 -0
- package/dist/esm/core/error-handler.d.ts +112 -0
- package/dist/esm/core/error-handler.js +239 -0
- package/dist/esm/core/index.d.ts +59 -0
- package/dist/esm/core/index.js +69 -0
- package/dist/esm/core/ingestion.d.ts +202 -0
- package/dist/esm/core/ingestion.js +904 -0
- package/dist/esm/core/interfaces.d.ts +408 -0
- package/dist/esm/core/interfaces.js +106 -0
- package/dist/esm/core/knowledge-base-manager.d.ts +109 -0
- package/dist/esm/core/knowledge-base-manager.js +256 -0
- package/dist/esm/core/lazy-dependency-loader.d.ts +147 -0
- package/dist/esm/core/lazy-dependency-loader.js +435 -0
- package/dist/esm/core/mode-detection-service.d.ts +150 -0
- package/dist/esm/core/mode-detection-service.js +565 -0
- package/dist/esm/core/mode-model-validator.d.ts +92 -0
- package/dist/esm/core/mode-model-validator.js +203 -0
- package/dist/esm/core/model-registry.d.ts +116 -0
- package/dist/esm/core/model-registry.js +411 -0
- package/dist/esm/core/model-validator.d.ts +217 -0
- package/dist/esm/core/model-validator.js +782 -0
- package/dist/esm/core/path-manager.d.ts +47 -0
- package/dist/esm/core/path-manager.js +71 -0
- package/dist/esm/core/raglite-paths.d.ts +121 -0
- package/dist/esm/core/raglite-paths.js +145 -0
- package/dist/esm/core/reranking-config.d.ts +42 -0
- package/dist/esm/core/reranking-config.js +147 -0
- package/dist/esm/core/reranking-factory.d.ts +92 -0
- package/dist/esm/core/reranking-factory.js +410 -0
- package/dist/esm/core/reranking-strategies.d.ts +310 -0
- package/dist/esm/core/reranking-strategies.js +650 -0
- package/dist/esm/core/resource-cleanup.d.ts +163 -0
- package/dist/esm/core/resource-cleanup.js +371 -0
- package/dist/esm/core/resource-manager.d.ts +212 -0
- package/dist/esm/core/resource-manager.js +564 -0
- package/dist/esm/core/search-pipeline.d.ts +111 -0
- package/dist/esm/core/search-pipeline.js +287 -0
- package/dist/esm/core/search.d.ts +141 -0
- package/dist/esm/core/search.js +320 -0
- package/dist/esm/core/streaming-operations.d.ts +145 -0
- package/dist/esm/core/streaming-operations.js +409 -0
- package/dist/esm/core/types.d.ts +66 -0
- package/dist/esm/core/types.js +6 -0
- package/dist/esm/core/universal-embedder.d.ts +177 -0
- package/dist/esm/core/universal-embedder.js +139 -0
- package/dist/esm/core/validation-messages.d.ts +99 -0
- package/dist/esm/core/validation-messages.js +334 -0
- package/dist/esm/core/vector-index-messages.d.ts +52 -0
- package/dist/esm/core/vector-index-messages.js +5 -0
- package/dist/esm/core/vector-index-worker.d.ts +6 -0
- package/dist/esm/core/vector-index-worker.js +304 -0
- package/dist/esm/core/vector-index.d.ts +107 -0
- package/dist/esm/core/vector-index.js +344 -0
- package/dist/esm/dom-polyfills.d.ts +6 -0
- package/dist/esm/dom-polyfills.js +37 -0
- package/dist/esm/factories/index.d.ts +27 -0
- package/dist/esm/factories/index.js +29 -0
- package/dist/esm/factories/ingestion-factory.d.ts +200 -0
- package/dist/esm/factories/ingestion-factory.js +473 -0
- package/dist/esm/factories/search-factory.d.ts +154 -0
- package/dist/esm/factories/search-factory.js +355 -0
- package/dist/esm/file-processor.d.ts +147 -0
- package/dist/esm/file-processor.js +963 -0
- package/dist/esm/index-manager.d.ts +136 -0
- package/dist/esm/index-manager.js +667 -0
- package/dist/esm/index.d.ts +76 -0
- package/dist/esm/index.js +112 -0
- package/dist/esm/indexer.d.ts +7 -0
- package/dist/esm/indexer.js +54 -0
- package/dist/esm/ingestion.d.ts +63 -0
- package/dist/esm/ingestion.js +124 -0
- package/dist/esm/mcp-server.d.ts +46 -0
- package/dist/esm/mcp-server.js +1820 -0
- package/dist/esm/multimodal/clip-embedder.d.ts +327 -0
- package/dist/esm/multimodal/clip-embedder.js +996 -0
- package/dist/esm/multimodal/index.d.ts +6 -0
- package/dist/esm/multimodal/index.js +6 -0
- package/dist/esm/preprocess.d.ts +19 -0
- package/dist/esm/preprocess.js +203 -0
- package/dist/esm/preprocessors/index.d.ts +17 -0
- package/dist/esm/preprocessors/index.js +38 -0
- package/dist/esm/preprocessors/mdx.d.ts +25 -0
- package/dist/esm/preprocessors/mdx.js +101 -0
- package/dist/esm/preprocessors/mermaid.d.ts +68 -0
- package/dist/esm/preprocessors/mermaid.js +329 -0
- package/dist/esm/preprocessors/registry.d.ts +56 -0
- package/dist/esm/preprocessors/registry.js +179 -0
- package/dist/esm/run-error-recovery-tests.d.ts +7 -0
- package/dist/esm/run-error-recovery-tests.js +101 -0
- package/dist/esm/search-standalone.d.ts +7 -0
- package/dist/esm/search-standalone.js +117 -0
- package/dist/esm/search.d.ts +99 -0
- package/dist/esm/search.js +177 -0
- package/dist/esm/test-utils.d.ts +18 -0
- package/dist/esm/test-utils.js +27 -0
- package/dist/esm/text/chunker.d.ts +33 -0
- package/dist/esm/text/chunker.js +279 -0
- package/dist/esm/text/embedder.d.ts +111 -0
- package/dist/esm/text/embedder.js +386 -0
- package/dist/esm/text/index.d.ts +8 -0
- package/dist/esm/text/index.js +9 -0
- package/dist/esm/text/preprocessors/index.d.ts +17 -0
- package/dist/esm/text/preprocessors/index.js +38 -0
- package/dist/esm/text/preprocessors/mdx.d.ts +25 -0
- package/dist/esm/text/preprocessors/mdx.js +101 -0
- package/dist/esm/text/preprocessors/mermaid.d.ts +68 -0
- package/dist/esm/text/preprocessors/mermaid.js +330 -0
- package/dist/esm/text/preprocessors/registry.d.ts +56 -0
- package/dist/esm/text/preprocessors/registry.js +180 -0
- package/dist/esm/text/reranker.d.ts +49 -0
- package/dist/esm/text/reranker.js +274 -0
- package/dist/esm/text/sentence-transformer-embedder.d.ts +96 -0
- package/dist/esm/text/sentence-transformer-embedder.js +340 -0
- package/dist/esm/text/tokenizer.d.ts +22 -0
- package/dist/esm/text/tokenizer.js +64 -0
- package/dist/esm/types.d.ts +83 -0
- package/dist/esm/types.js +3 -0
- package/dist/esm/utils/vector-math.d.ts +31 -0
- package/dist/esm/utils/vector-math.js +70 -0
- package/package.json +39 -14
- package/dist/core/vector-index.d.ts +0 -72
- package/dist/core/vector-index.js +0 -331
- /package/dist/{api-errors.d.ts → cjs/api-errors.d.ts} +0 -0
- /package/dist/{api-errors.js → cjs/api-errors.js} +0 -0
- /package/dist/{cli → cjs/cli}/indexer.d.ts +0 -0
- /package/dist/{cli → cjs/cli}/search.d.ts +0 -0
- /package/dist/{cli → cjs/cli}/search.js +0 -0
- /package/dist/{cli.d.ts → cjs/cli.d.ts} +0 -0
- /package/dist/{config.d.ts → cjs/config.d.ts} +0 -0
- /package/dist/{config.js → cjs/config.js} +0 -0
- /package/dist/{core → cjs/core}/abstract-embedder.d.ts +0 -0
- /package/dist/{core → cjs/core}/abstract-embedder.js +0 -0
- /package/dist/{core → cjs/core}/actionable-error-messages.d.ts +0 -0
- /package/dist/{core → cjs/core}/actionable-error-messages.js +0 -0
- /package/dist/{core → cjs/core}/adapters.d.ts +0 -0
- /package/dist/{core → cjs/core}/adapters.js +0 -0
- /package/dist/{core → cjs/core}/batch-processing-optimizer.d.ts +0 -0
- /package/dist/{core → cjs/core}/batch-processing-optimizer.js +0 -0
- /package/dist/{core → cjs/core}/binary-index-format.d.ts +0 -0
- /package/dist/{core → cjs/core}/chunker.d.ts +0 -0
- /package/dist/{core → cjs/core}/chunker.js +0 -0
- /package/dist/{core → cjs/core}/cli-database-utils.d.ts +0 -0
- /package/dist/{core → cjs/core}/cli-database-utils.js +0 -0
- /package/dist/{core → cjs/core}/config.d.ts +0 -0
- /package/dist/{core → cjs/core}/config.js +0 -0
- /package/dist/{core → cjs/core}/content-errors.d.ts +0 -0
- /package/dist/{core → cjs/core}/content-errors.js +0 -0
- /package/dist/{core → cjs/core}/content-manager.d.ts +0 -0
- /package/dist/{core → cjs/core}/content-manager.js +0 -0
- /package/dist/{core → cjs/core}/content-performance-optimizer.d.ts +0 -0
- /package/dist/{core → cjs/core}/content-performance-optimizer.js +0 -0
- /package/dist/{core → cjs/core}/content-resolver.d.ts +0 -0
- /package/dist/{core → cjs/core}/content-resolver.js +0 -0
- /package/dist/{core → cjs/core}/cross-modal-search.d.ts +0 -0
- /package/dist/{core → cjs/core}/cross-modal-search.js +0 -0
- /package/dist/{core → cjs/core}/database-connection-manager.d.ts +0 -0
- /package/dist/{core → cjs/core}/database-connection-manager.js +0 -0
- /package/dist/{core → cjs/core}/embedder-factory.d.ts +0 -0
- /package/dist/{core → cjs/core}/embedder-factory.js +0 -0
- /package/dist/{core → cjs/core}/error-handler.d.ts +0 -0
- /package/dist/{core → cjs/core}/error-handler.js +0 -0
- /package/dist/{core → cjs/core}/index.d.ts +0 -0
- /package/dist/{core → cjs/core}/index.js +0 -0
- /package/dist/{core → cjs/core}/ingestion.d.ts +0 -0
- /package/dist/{core → cjs/core}/interfaces.d.ts +0 -0
- /package/dist/{core → cjs/core}/interfaces.js +0 -0
- /package/dist/{core → cjs/core}/lazy-dependency-loader.d.ts +0 -0
- /package/dist/{core → cjs/core}/lazy-dependency-loader.js +0 -0
- /package/dist/{core → cjs/core}/mode-detection-service.d.ts +0 -0
- /package/dist/{core → cjs/core}/mode-detection-service.js +0 -0
- /package/dist/{core → cjs/core}/mode-model-validator.d.ts +0 -0
- /package/dist/{core → cjs/core}/mode-model-validator.js +0 -0
- /package/dist/{core → cjs/core}/model-registry.d.ts +0 -0
- /package/dist/{core → cjs/core}/model-registry.js +0 -0
- /package/dist/{core → cjs/core}/model-validator.d.ts +0 -0
- /package/dist/{core → cjs/core}/path-manager.d.ts +0 -0
- /package/dist/{core → cjs/core}/path-manager.js +0 -0
- /package/dist/{core → cjs/core}/raglite-paths.d.ts +0 -0
- /package/dist/{core → cjs/core}/raglite-paths.js +0 -0
- /package/dist/{core → cjs/core}/reranking-config.d.ts +0 -0
- /package/dist/{core → cjs/core}/reranking-config.js +0 -0
- /package/dist/{core → cjs/core}/reranking-factory.d.ts +0 -0
- /package/dist/{core → cjs/core}/reranking-factory.js +0 -0
- /package/dist/{core → cjs/core}/reranking-strategies.d.ts +0 -0
- /package/dist/{core → cjs/core}/reranking-strategies.js +0 -0
- /package/dist/{core → cjs/core}/resource-cleanup.d.ts +0 -0
- /package/dist/{core → cjs/core}/resource-cleanup.js +0 -0
- /package/dist/{core → cjs/core}/resource-manager.d.ts +0 -0
- /package/dist/{core → cjs/core}/resource-manager.js +0 -0
- /package/dist/{core → cjs/core}/search-pipeline.d.ts +0 -0
- /package/dist/{core → cjs/core}/search.d.ts +0 -0
- /package/dist/{core → cjs/core}/streaming-operations.d.ts +0 -0
- /package/dist/{core → cjs/core}/streaming-operations.js +0 -0
- /package/dist/{core → cjs/core}/types.d.ts +0 -0
- /package/dist/{core → cjs/core}/types.js +0 -0
- /package/dist/{core → cjs/core}/universal-embedder.d.ts +0 -0
- /package/dist/{core → cjs/core}/universal-embedder.js +0 -0
- /package/dist/{core → cjs/core}/validation-messages.d.ts +0 -0
- /package/dist/{core → cjs/core}/validation-messages.js +0 -0
- /package/dist/{dom-polyfills.d.ts → cjs/dom-polyfills.d.ts} +0 -0
- /package/dist/{dom-polyfills.js → cjs/dom-polyfills.js} +0 -0
- /package/dist/{factories → cjs/factories}/index.d.ts +0 -0
- /package/dist/{factories → cjs/factories}/index.js +0 -0
- /package/dist/{factories → cjs/factories}/ingestion-factory.d.ts +0 -0
- /package/dist/{factories → cjs/factories}/search-factory.d.ts +0 -0
- /package/dist/{file-processor.d.ts → cjs/file-processor.d.ts} +0 -0
- /package/dist/{file-processor.js → cjs/file-processor.js} +0 -0
- /package/dist/{indexer.d.ts → cjs/indexer.d.ts} +0 -0
- /package/dist/{indexer.js → cjs/indexer.js} +0 -0
- /package/dist/{ingestion.d.ts → cjs/ingestion.d.ts} +0 -0
- /package/dist/{ingestion.js → cjs/ingestion.js} +0 -0
- /package/dist/{mcp-server.d.ts → cjs/mcp-server.d.ts} +0 -0
- /package/dist/{mcp-server.js → cjs/mcp-server.js} +0 -0
- /package/dist/{multimodal → cjs/multimodal}/clip-embedder.d.ts +0 -0
- /package/dist/{multimodal → cjs/multimodal}/clip-embedder.js +0 -0
- /package/dist/{multimodal → cjs/multimodal}/index.d.ts +0 -0
- /package/dist/{multimodal → cjs/multimodal}/index.js +0 -0
- /package/dist/{preprocess.d.ts → cjs/preprocess.d.ts} +0 -0
- /package/dist/{preprocess.js → cjs/preprocess.js} +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/index.d.ts +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/index.js +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/mdx.d.ts +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/mdx.js +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/mermaid.d.ts +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/mermaid.js +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/registry.d.ts +0 -0
- /package/dist/{preprocessors → cjs/preprocessors}/registry.js +0 -0
- /package/dist/{run-error-recovery-tests.d.ts → cjs/run-error-recovery-tests.d.ts} +0 -0
- /package/dist/{run-error-recovery-tests.js → cjs/run-error-recovery-tests.js} +0 -0
- /package/dist/{search-standalone.d.ts → cjs/search-standalone.d.ts} +0 -0
- /package/dist/{search-standalone.js → cjs/search-standalone.js} +0 -0
- /package/dist/{search.d.ts → cjs/search.d.ts} +0 -0
- /package/dist/{search.js → cjs/search.js} +0 -0
- /package/dist/{test-utils.d.ts → cjs/test-utils.d.ts} +0 -0
- /package/dist/{test-utils.js → cjs/test-utils.js} +0 -0
- /package/dist/{text → cjs/text}/chunker.d.ts +0 -0
- /package/dist/{text → cjs/text}/chunker.js +0 -0
- /package/dist/{text → cjs/text}/embedder.d.ts +0 -0
- /package/dist/{text → cjs/text}/embedder.js +0 -0
- /package/dist/{text → cjs/text}/index.d.ts +0 -0
- /package/dist/{text → cjs/text}/index.js +0 -0
- /package/dist/{text → cjs/text}/preprocessors/index.d.ts +0 -0
- /package/dist/{text → cjs/text}/preprocessors/index.js +0 -0
- /package/dist/{text → cjs/text}/preprocessors/mdx.d.ts +0 -0
- /package/dist/{text → cjs/text}/preprocessors/mdx.js +0 -0
- /package/dist/{text → cjs/text}/preprocessors/mermaid.d.ts +0 -0
- /package/dist/{text → cjs/text}/preprocessors/mermaid.js +0 -0
- /package/dist/{text → cjs/text}/preprocessors/registry.d.ts +0 -0
- /package/dist/{text → cjs/text}/preprocessors/registry.js +0 -0
- /package/dist/{text → cjs/text}/reranker.d.ts +0 -0
- /package/dist/{text → cjs/text}/reranker.js +0 -0
- /package/dist/{text → cjs/text}/sentence-transformer-embedder.d.ts +0 -0
- /package/dist/{text → cjs/text}/sentence-transformer-embedder.js +0 -0
- /package/dist/{text → cjs/text}/tokenizer.d.ts +0 -0
- /package/dist/{text → cjs/text}/tokenizer.js +0 -0
- /package/dist/{types.d.ts → cjs/types.d.ts} +0 -0
- /package/dist/{types.js → cjs/types.js} +0 -0
- /package/dist/{utils → cjs/utils}/vector-math.d.ts +0 -0
- /package/dist/{utils → cjs/utils}/vector-math.js +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content System Error Handling - Comprehensive error handling for unified content system
|
|
3
|
+
* Implements task 8.1: Add specific error types for content operations with clear guidance
|
|
4
|
+
* Requirements: 8.1, 8.2, 8.3, 8.6
|
|
5
|
+
*/
|
|
6
|
+
import { APIError, ErrorFactory } from '../api-errors.js';
|
|
7
|
+
import { ErrorSeverity } from './error-handler.js';
|
|
8
|
+
/**
|
|
9
|
+
* Content-specific error types for unified content system operations
|
|
10
|
+
*/
|
|
11
|
+
export declare class ContentNotFoundError extends APIError {
|
|
12
|
+
constructor(contentId: string, displayName?: string, context?: string);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Error when storage limits are exceeded
|
|
16
|
+
*/
|
|
17
|
+
export declare class StorageLimitExceededError extends APIError {
|
|
18
|
+
constructor(currentUsageMB: number, limitMB: number, contentSizeMB: number, context?: string);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error when content format is invalid or unsupported
|
|
22
|
+
*/
|
|
23
|
+
export declare class InvalidContentFormatError extends APIError {
|
|
24
|
+
constructor(contentType: string, reason: string, context?: string);
|
|
25
|
+
private static getSuggestionsForContentType;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Error when content ingestion fails
|
|
29
|
+
*/
|
|
30
|
+
export declare class ContentIngestionError extends APIError {
|
|
31
|
+
constructor(operation: string, reason: string, context?: string);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Error when content retrieval fails
|
|
35
|
+
*/
|
|
36
|
+
export declare class ContentRetrievalError extends APIError {
|
|
37
|
+
constructor(contentId: string, format: string, reason: string, context?: string);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Error when content directory operations fail
|
|
41
|
+
*/
|
|
42
|
+
export declare class ContentDirectoryError extends APIError {
|
|
43
|
+
constructor(operation: string, reason: string, context?: string);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Error when content deduplication fails
|
|
47
|
+
*/
|
|
48
|
+
export declare class ContentDeduplicationError extends APIError {
|
|
49
|
+
constructor(reason: string, context?: string);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Enhanced error factory for content system operations
|
|
53
|
+
* Extends the base ErrorFactory with content-specific error handling
|
|
54
|
+
*/
|
|
55
|
+
export declare class ContentErrorFactory extends ErrorFactory {
|
|
56
|
+
/**
|
|
57
|
+
* Create content-specific error from generic error
|
|
58
|
+
*/
|
|
59
|
+
static createContentError(error: unknown, operation: string, context: string): APIError;
|
|
60
|
+
/**
|
|
61
|
+
* Create storage-related error with enhanced guidance
|
|
62
|
+
*/
|
|
63
|
+
static createStorageError(error: unknown, context: string): APIError;
|
|
64
|
+
/**
|
|
65
|
+
* Create format validation error with specific guidance
|
|
66
|
+
*/
|
|
67
|
+
static createFormatError(contentType: string, reason: string, context: string): InvalidContentFormatError;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Content system error handler with categorized error management
|
|
71
|
+
*/
|
|
72
|
+
export declare class ContentErrorHandler {
|
|
73
|
+
/**
|
|
74
|
+
* Handle content operation errors with appropriate categorization
|
|
75
|
+
*/
|
|
76
|
+
static handleContentError(error: unknown, operation: string, context: string, options?: {
|
|
77
|
+
severity?: ErrorSeverity;
|
|
78
|
+
skipError?: boolean;
|
|
79
|
+
showStack?: boolean;
|
|
80
|
+
}): never;
|
|
81
|
+
/**
|
|
82
|
+
* Get appropriate error category for content errors
|
|
83
|
+
*/
|
|
84
|
+
private static getCategoryForError;
|
|
85
|
+
/**
|
|
86
|
+
* Validate content operation parameters and throw appropriate errors
|
|
87
|
+
*/
|
|
88
|
+
static validateContentOperation(contentId?: string, format?: string, contentType?: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Create user-friendly error message for common content scenarios
|
|
91
|
+
*/
|
|
92
|
+
static createUserFriendlyMessage(error: APIError): string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Utility functions for content error handling
|
|
96
|
+
*/
|
|
97
|
+
export declare const ContentErrorUtils: {
|
|
98
|
+
/**
|
|
99
|
+
* Check if an error is content-related
|
|
100
|
+
*/
|
|
101
|
+
isContentError(error: unknown): error is APIError;
|
|
102
|
+
/**
|
|
103
|
+
* Extract content ID from error message
|
|
104
|
+
*/
|
|
105
|
+
extractContentId(error: APIError): string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Get recovery action for content error
|
|
108
|
+
*/
|
|
109
|
+
getRecoveryAction(error: APIError): string;
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=content-errors.d.ts.map
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content System Error Handling - Comprehensive error handling for unified content system
|
|
3
|
+
* Implements task 8.1: Add specific error types for content operations with clear guidance
|
|
4
|
+
* Requirements: 8.1, 8.2, 8.3, 8.6
|
|
5
|
+
*/
|
|
6
|
+
import { APIError, ErrorFactory } from '../api-errors.js';
|
|
7
|
+
import { CategorizedError, ErrorCategory, ErrorSeverity } from './error-handler.js';
|
|
8
|
+
/**
|
|
9
|
+
* Content-specific error types for unified content system operations
|
|
10
|
+
*/
|
|
11
|
+
export class ContentNotFoundError extends APIError {
|
|
12
|
+
constructor(contentId, displayName, context) {
|
|
13
|
+
const message = displayName
|
|
14
|
+
? `Content not found: ${displayName} (ID: ${contentId})`
|
|
15
|
+
: `Content not found: ${contentId}`;
|
|
16
|
+
super(message, 'CONTENT_NOT_FOUND', [
|
|
17
|
+
'Re-ingest the content to restore access',
|
|
18
|
+
'Check that the content ID is correct',
|
|
19
|
+
'Verify the content was successfully ingested previously',
|
|
20
|
+
'If the content was from a file, ensure the file still exists at its original location'
|
|
21
|
+
], context);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Error when storage limits are exceeded
|
|
26
|
+
*/
|
|
27
|
+
export class StorageLimitExceededError extends APIError {
|
|
28
|
+
constructor(currentUsageMB, limitMB, contentSizeMB, context) {
|
|
29
|
+
const message = `Storage limit exceeded. Cannot add ${contentSizeMB}MB content. ` +
|
|
30
|
+
`Current usage: ${currentUsageMB}MB / ${limitMB}MB`;
|
|
31
|
+
super(message, 'STORAGE_LIMIT_EXCEEDED', [
|
|
32
|
+
'Run cleanup to remove orphaned files: removeOrphanedFiles()',
|
|
33
|
+
'Remove duplicate content: removeDuplicateContent()',
|
|
34
|
+
'Increase storage limit in configuration',
|
|
35
|
+
'Delete unused content manually from the content directory',
|
|
36
|
+
`Free up at least ${Math.ceil(contentSizeMB - (limitMB - currentUsageMB))}MB of space`
|
|
37
|
+
], context);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Error when content format is invalid or unsupported
|
|
42
|
+
*/
|
|
43
|
+
export class InvalidContentFormatError extends APIError {
|
|
44
|
+
constructor(contentType, reason, context) {
|
|
45
|
+
const message = `Invalid content format: ${contentType}. ${reason}`;
|
|
46
|
+
super(message, 'INVALID_CONTENT_FORMAT', InvalidContentFormatError.getSuggestionsForContentType(contentType), context);
|
|
47
|
+
}
|
|
48
|
+
static getSuggestionsForContentType(contentType) {
|
|
49
|
+
const category = contentType.split('/')[0];
|
|
50
|
+
switch (category) {
|
|
51
|
+
case 'audio':
|
|
52
|
+
return [
|
|
53
|
+
'Audio files are not supported for text-based RAG processing',
|
|
54
|
+
'Consider extracting transcripts or metadata from audio files',
|
|
55
|
+
'Use speech-to-text services to convert audio to text before ingestion',
|
|
56
|
+
'Supported formats include text, documents (PDF, DOCX), and images'
|
|
57
|
+
];
|
|
58
|
+
case 'video':
|
|
59
|
+
return [
|
|
60
|
+
'Video files are not supported for text-based RAG processing',
|
|
61
|
+
'Consider extracting subtitles, transcripts, or metadata from video files',
|
|
62
|
+
'Use video analysis tools to extract text content before ingestion',
|
|
63
|
+
'Supported formats include text, documents (PDF, DOCX), and images'
|
|
64
|
+
];
|
|
65
|
+
case 'application':
|
|
66
|
+
if (contentType.includes('executable') || contentType.includes('binary')) {
|
|
67
|
+
return [
|
|
68
|
+
'Executable and binary files are not supported for security reasons',
|
|
69
|
+
'Only document and text formats are supported for processing',
|
|
70
|
+
'Supported application formats: PDF, Office documents (DOCX, XLSX, PPTX)',
|
|
71
|
+
'Convert binary data to text format if it contains readable content'
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return [
|
|
76
|
+
'This application format is not currently supported',
|
|
77
|
+
'Supported application formats: PDF, Office documents (DOCX, XLSX, PPTX), JSON, XML',
|
|
78
|
+
'Convert the content to a supported format like PDF or plain text',
|
|
79
|
+
'Check the file extension and ensure it matches the actual content type'
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
default:
|
|
83
|
+
return [
|
|
84
|
+
`The ${category} content type is not supported`,
|
|
85
|
+
'Supported types: text files, documents (PDF, DOCX), images (JPEG, PNG)',
|
|
86
|
+
'Convert the content to a supported format before ingestion',
|
|
87
|
+
'Check that the file is not corrupted and has the correct extension'
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Error when content ingestion fails
|
|
94
|
+
*/
|
|
95
|
+
export class ContentIngestionError extends APIError {
|
|
96
|
+
constructor(operation, reason, context) {
|
|
97
|
+
const message = `Content ingestion failed during ${operation}: ${reason}`;
|
|
98
|
+
super(message, 'CONTENT_INGESTION_FAILED', [
|
|
99
|
+
'Check that the content is valid and not corrupted',
|
|
100
|
+
'Ensure sufficient disk space is available',
|
|
101
|
+
'Verify file permissions allow reading the content',
|
|
102
|
+
'Try ingesting the content again',
|
|
103
|
+
'Check content size limits and format requirements'
|
|
104
|
+
], context);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Error when content retrieval fails
|
|
109
|
+
*/
|
|
110
|
+
export class ContentRetrievalError extends APIError {
|
|
111
|
+
constructor(contentId, format, reason, context) {
|
|
112
|
+
const message = `Content retrieval failed for ${contentId} in ${format} format: ${reason}`;
|
|
113
|
+
super(message, 'CONTENT_RETRIEVAL_FAILED', [
|
|
114
|
+
'Check that the content still exists and is accessible',
|
|
115
|
+
'Verify the content ID is correct',
|
|
116
|
+
'Ensure the requested format is supported (file or base64)',
|
|
117
|
+
'Try retrieving the content in a different format',
|
|
118
|
+
'Re-ingest the content if the file has been moved or deleted'
|
|
119
|
+
], context);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Error when content directory operations fail
|
|
124
|
+
*/
|
|
125
|
+
export class ContentDirectoryError extends APIError {
|
|
126
|
+
constructor(operation, reason, context) {
|
|
127
|
+
const message = `Content directory ${operation} failed: ${reason}`;
|
|
128
|
+
super(message, 'CONTENT_DIRECTORY_ERROR', [
|
|
129
|
+
'Check that the content directory exists and is writable',
|
|
130
|
+
'Verify sufficient disk space is available',
|
|
131
|
+
'Ensure proper file permissions for the content directory',
|
|
132
|
+
'Try creating the content directory manually if it doesn\'t exist',
|
|
133
|
+
'Check for file system errors or corruption'
|
|
134
|
+
], context);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Error when content deduplication fails
|
|
139
|
+
*/
|
|
140
|
+
export class ContentDeduplicationError extends APIError {
|
|
141
|
+
constructor(reason, context) {
|
|
142
|
+
const message = `Content deduplication failed: ${reason}`;
|
|
143
|
+
super(message, 'CONTENT_DEDUPLICATION_FAILED', [
|
|
144
|
+
'Check database connectivity and integrity',
|
|
145
|
+
'Verify content hash calculations are working correctly',
|
|
146
|
+
'Try running database repair operations',
|
|
147
|
+
'Ensure sufficient memory for hash calculations',
|
|
148
|
+
'Check for file system errors in the content directory'
|
|
149
|
+
], context);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Enhanced error factory for content system operations
|
|
154
|
+
* Extends the base ErrorFactory with content-specific error handling
|
|
155
|
+
*/
|
|
156
|
+
export class ContentErrorFactory extends ErrorFactory {
|
|
157
|
+
/**
|
|
158
|
+
* Create content-specific error from generic error
|
|
159
|
+
*/
|
|
160
|
+
static createContentError(error, operation, context) {
|
|
161
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
162
|
+
// Handle specific content error scenarios
|
|
163
|
+
if (errorMessage.includes('Content not found') || errorMessage.includes('ENOENT')) {
|
|
164
|
+
const contentIdMatch = errorMessage.match(/Content not found: (.+?)(?:\s|$)/);
|
|
165
|
+
const contentId = contentIdMatch ? contentIdMatch[1] : 'unknown';
|
|
166
|
+
return new ContentNotFoundError(contentId, undefined, context);
|
|
167
|
+
}
|
|
168
|
+
if (errorMessage.includes('Storage limit exceeded')) {
|
|
169
|
+
// Extract usage information from error message
|
|
170
|
+
const usageMatch = errorMessage.match(/Current usage: ([\d.]+)MB.*Storage limit: ([\d.]+)MB/);
|
|
171
|
+
const contentMatch = errorMessage.match(/Cannot add ([\d.]+)MB content/);
|
|
172
|
+
const currentUsage = usageMatch ? parseFloat(usageMatch[1]) : 0;
|
|
173
|
+
const limit = usageMatch ? parseFloat(usageMatch[2]) : 0;
|
|
174
|
+
const contentSize = contentMatch ? parseFloat(contentMatch[1]) : 0;
|
|
175
|
+
return new StorageLimitExceededError(currentUsage, limit, contentSize, context);
|
|
176
|
+
}
|
|
177
|
+
if (errorMessage.includes('Content type validation failed') ||
|
|
178
|
+
errorMessage.includes('Unsupported content type')) {
|
|
179
|
+
const typeMatch = errorMessage.match(/(?:Content type validation failed|Unsupported content type): (.+?)(?:\.|$)/);
|
|
180
|
+
const contentType = typeMatch ? typeMatch[1] : 'unknown';
|
|
181
|
+
return new InvalidContentFormatError(contentType, errorMessage, context);
|
|
182
|
+
}
|
|
183
|
+
if (errorMessage.includes('Failed to ingest')) {
|
|
184
|
+
return new ContentIngestionError(operation, errorMessage, context);
|
|
185
|
+
}
|
|
186
|
+
if (errorMessage.includes('Failed to retrieve content') ||
|
|
187
|
+
errorMessage.includes('Content retrieval failed')) {
|
|
188
|
+
return new ContentRetrievalError('unknown', 'unknown', errorMessage, context);
|
|
189
|
+
}
|
|
190
|
+
if (errorMessage.includes('content directory') ||
|
|
191
|
+
errorMessage.includes('Content directory')) {
|
|
192
|
+
return new ContentDirectoryError(operation, errorMessage, context);
|
|
193
|
+
}
|
|
194
|
+
if (errorMessage.includes('deduplication') || errorMessage.includes('duplicate')) {
|
|
195
|
+
return new ContentDeduplicationError(errorMessage, context);
|
|
196
|
+
}
|
|
197
|
+
// For generic errors that don't match specific patterns, create a generic content ingestion error
|
|
198
|
+
return new ContentIngestionError(operation, errorMessage, context);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create storage-related error with enhanced guidance
|
|
202
|
+
*/
|
|
203
|
+
static createStorageError(error, context) {
|
|
204
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
205
|
+
if (errorMessage.includes('ENOSPC') || errorMessage.includes('no space left')) {
|
|
206
|
+
return new StorageLimitExceededError(0, 0, 0, context);
|
|
207
|
+
}
|
|
208
|
+
if (errorMessage.includes('EACCES') || errorMessage.includes('permission denied')) {
|
|
209
|
+
return new ContentDirectoryError('permission check', 'Permission denied accessing content directory', context);
|
|
210
|
+
}
|
|
211
|
+
if (errorMessage.includes('ENOENT') || errorMessage.includes('no such file')) {
|
|
212
|
+
return new ContentDirectoryError('directory access', 'Content directory does not exist or is not accessible', context);
|
|
213
|
+
}
|
|
214
|
+
return new ContentDirectoryError('operation', errorMessage, context);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Create format validation error with specific guidance
|
|
218
|
+
*/
|
|
219
|
+
static createFormatError(contentType, reason, context) {
|
|
220
|
+
return new InvalidContentFormatError(contentType, reason, context);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Content system error handler with categorized error management
|
|
225
|
+
*/
|
|
226
|
+
export class ContentErrorHandler {
|
|
227
|
+
/**
|
|
228
|
+
* Handle content operation errors with appropriate categorization
|
|
229
|
+
*/
|
|
230
|
+
static handleContentError(error, operation, context, options = {}) {
|
|
231
|
+
const contentError = ContentErrorFactory.createContentError(error, operation, context);
|
|
232
|
+
// Log the error with appropriate category
|
|
233
|
+
const category = this.getCategoryForError(contentError);
|
|
234
|
+
const severity = options.severity || ErrorSeverity.ERROR;
|
|
235
|
+
const categorizedError = new CategorizedError(contentError.getFormattedMessage(), category, severity);
|
|
236
|
+
if (!options.skipError) {
|
|
237
|
+
categorizedError.name = contentError.constructor.name;
|
|
238
|
+
console.error(`\n${categorizedError.name}: ${contentError.message}`);
|
|
239
|
+
if (contentError.context) {
|
|
240
|
+
console.error(`Context: ${contentError.context}`);
|
|
241
|
+
}
|
|
242
|
+
if (contentError.suggestions.length > 0) {
|
|
243
|
+
console.error('\nSuggestions:');
|
|
244
|
+
contentError.suggestions.forEach((suggestion, index) => {
|
|
245
|
+
console.error(` ${index + 1}. ${suggestion}`);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
if (options.showStack && error instanceof Error && error.stack) {
|
|
249
|
+
console.error('\nStack trace:', error.stack);
|
|
250
|
+
}
|
|
251
|
+
console.error(''); // Empty line for better readability
|
|
252
|
+
}
|
|
253
|
+
throw contentError;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Get appropriate error category for content errors
|
|
257
|
+
*/
|
|
258
|
+
static getCategoryForError(error) {
|
|
259
|
+
switch (error.code) {
|
|
260
|
+
case 'CONTENT_NOT_FOUND':
|
|
261
|
+
case 'CONTENT_RETRIEVAL_FAILED':
|
|
262
|
+
return ErrorCategory.FILE_SYSTEM;
|
|
263
|
+
case 'STORAGE_LIMIT_EXCEEDED':
|
|
264
|
+
case 'CONTENT_DIRECTORY_ERROR':
|
|
265
|
+
return ErrorCategory.FILE_SYSTEM;
|
|
266
|
+
case 'INVALID_CONTENT_FORMAT':
|
|
267
|
+
return ErrorCategory.VALIDATION;
|
|
268
|
+
case 'CONTENT_INGESTION_FAILED':
|
|
269
|
+
return ErrorCategory.GENERAL;
|
|
270
|
+
case 'CONTENT_DEDUPLICATION_FAILED':
|
|
271
|
+
return ErrorCategory.DATABASE;
|
|
272
|
+
default:
|
|
273
|
+
return ErrorCategory.GENERAL;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Validate content operation parameters and throw appropriate errors
|
|
278
|
+
*/
|
|
279
|
+
static validateContentOperation(contentId, format, contentType) {
|
|
280
|
+
if (contentId && typeof contentId !== 'string') {
|
|
281
|
+
throw new ContentRetrievalError(String(contentId), format || 'unknown', 'Content ID must be a string', 'parameter_validation');
|
|
282
|
+
}
|
|
283
|
+
if (format && !['file', 'base64'].includes(format)) {
|
|
284
|
+
throw new ContentRetrievalError(contentId || 'unknown', format, 'Format must be either "file" or "base64"', 'parameter_validation');
|
|
285
|
+
}
|
|
286
|
+
if (contentType && typeof contentType !== 'string') {
|
|
287
|
+
throw new InvalidContentFormatError(String(contentType), 'Content type must be a string', 'parameter_validation');
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Create user-friendly error message for common content scenarios
|
|
292
|
+
*/
|
|
293
|
+
static createUserFriendlyMessage(error) {
|
|
294
|
+
const baseMessage = error.message;
|
|
295
|
+
if (error.suggestions.length === 0) {
|
|
296
|
+
return baseMessage;
|
|
297
|
+
}
|
|
298
|
+
const suggestions = error.suggestions
|
|
299
|
+
.map((suggestion, index) => ` ${index + 1}. ${suggestion}`)
|
|
300
|
+
.join('\n');
|
|
301
|
+
return `${baseMessage}\n\nTo resolve this issue:\n${suggestions}`;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Utility functions for content error handling
|
|
306
|
+
*/
|
|
307
|
+
export const ContentErrorUtils = {
|
|
308
|
+
/**
|
|
309
|
+
* Check if an error is content-related
|
|
310
|
+
*/
|
|
311
|
+
isContentError(error) {
|
|
312
|
+
return error instanceof APIError &&
|
|
313
|
+
['CONTENT_NOT_FOUND', 'STORAGE_LIMIT_EXCEEDED', 'INVALID_CONTENT_FORMAT',
|
|
314
|
+
'CONTENT_INGESTION_FAILED', 'CONTENT_RETRIEVAL_FAILED', 'CONTENT_DIRECTORY_ERROR',
|
|
315
|
+
'CONTENT_DEDUPLICATION_FAILED'].includes(error.code);
|
|
316
|
+
},
|
|
317
|
+
/**
|
|
318
|
+
* Extract content ID from error message
|
|
319
|
+
*/
|
|
320
|
+
extractContentId(error) {
|
|
321
|
+
// Try to extract from "Content not found: displayName (ID: contentId)" format
|
|
322
|
+
let match = error.message.match(/Content not found: (.+?) \(ID: (.+?)\)/);
|
|
323
|
+
if (match) {
|
|
324
|
+
return match[1]; // Return display name
|
|
325
|
+
}
|
|
326
|
+
// Try to extract from "Content retrieval failed for contentId" format
|
|
327
|
+
match = error.message.match(/Content retrieval failed for (.+?) in/);
|
|
328
|
+
if (match) {
|
|
329
|
+
return match[1];
|
|
330
|
+
}
|
|
331
|
+
// Try to extract from simple "Content not found: contentId" format
|
|
332
|
+
match = error.message.match(/Content not found: (.+?)(?:\.|$)/);
|
|
333
|
+
if (match) {
|
|
334
|
+
return match[1];
|
|
335
|
+
}
|
|
336
|
+
return null;
|
|
337
|
+
},
|
|
338
|
+
/**
|
|
339
|
+
* Get recovery action for content error
|
|
340
|
+
*/
|
|
341
|
+
getRecoveryAction(error) {
|
|
342
|
+
switch (error.code) {
|
|
343
|
+
case 'CONTENT_NOT_FOUND':
|
|
344
|
+
return 'Re-ingest the content';
|
|
345
|
+
case 'STORAGE_LIMIT_EXCEEDED':
|
|
346
|
+
return 'Run cleanup operations or increase storage limit';
|
|
347
|
+
case 'INVALID_CONTENT_FORMAT':
|
|
348
|
+
return 'Convert content to supported format';
|
|
349
|
+
case 'CONTENT_INGESTION_FAILED':
|
|
350
|
+
return 'Check content validity and try again';
|
|
351
|
+
case 'CONTENT_RETRIEVAL_FAILED':
|
|
352
|
+
return 'Verify content exists and try different format';
|
|
353
|
+
case 'CONTENT_DIRECTORY_ERROR':
|
|
354
|
+
return 'Check directory permissions and disk space';
|
|
355
|
+
case 'CONTENT_DEDUPLICATION_FAILED':
|
|
356
|
+
return 'Check database integrity';
|
|
357
|
+
default:
|
|
358
|
+
return 'Check error details and try again';
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
//# sourceMappingURL=content-errors.js.map
|