2026-04-06 22:51:04 +08:00
|
|
|
class PageIndexError(Exception):
|
|
|
|
|
"""Base exception for all PageIndex SDK errors."""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CollectionNotFoundError(PageIndexError):
|
|
|
|
|
"""Collection does not exist."""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DocumentNotFoundError(PageIndexError):
|
|
|
|
|
"""Document ID not found."""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class IndexingError(PageIndexError):
|
|
|
|
|
"""Indexing pipeline failure."""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2026-05-11 21:06:23 +08:00
|
|
|
class PageIndexAPIError(PageIndexError):
|
|
|
|
|
"""PageIndex cloud API returned an error.
|
|
|
|
|
|
|
|
|
|
Kept for compatibility with the pageindex 0.2.x cloud SDK.
|
|
|
|
|
"""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CloudAPIError(PageIndexAPIError):
|
2026-04-06 22:51:04 +08:00
|
|
|
"""Cloud API returned error."""
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FileTypeError(PageIndexError):
|
|
|
|
|
"""Unsupported file type."""
|
|
|
|
|
pass
|