Python SDK
Exceptions Reference
SDK Reference: custom error classes raised during ingestion
Featuresmith uses a structured class hierarchy for errors raised during loading and ingestion. All custom exceptions inherit from ConnectorError.
Exception Hierarchy
| Exception Class | Parent Class | Trigger Condition |
|---|---|---|
| ConnectorError | Exception | Base error for all loading and connector-specific failures. |
| SourceNotFoundError | ConnectorError | Raised when a local file path does not exist. |
| UnsupportedFormatError | ConnectorError | Raised when a file extension or object type is unsupported. |
| SourceParseError | ConnectorError | Raised when pandas or Polars fails to parse a corrupted dataset. |
Robust Ingestion Guardrails
Exceptions do not expose raw table values or secure system information. Catching specific errors is simple:
python
import featuresmith as fsfrom featuresmith.core.exceptions import SourceNotFoundError, UnsupportedFormatErrortry: ds = fs.load("unsupported_extension.txt")except UnsupportedFormatError as e: print(f"Format check failed: {e}")except SourceNotFoundError: print("File path missing.")