bolster.exceptions
Bolster domain-specific exception hierarchy.
This module provides the constitutional exception hierarchy for all data source modules. All data sources MUST use these domain-specific exceptions instead of generic Exception.
Attributes
Exceptions
Base class for all data source errors. |
|
Raised when expected data publications or URLs are not found. |
|
Raised when data fails integrity validation checks. |
|
Raised when file or data parsing fails. |
|
Raised when network operations fail beyond retry limits. |
Module Contents
- exception bolster.exceptions.DataSourceError[source]
Bases:
ExceptionBase class for all data source errors.
This is the root exception for all domain-specific errors in Bolster. All other exceptions should inherit from this base class.
Initialize self. See help(type(self)) for accurate signature.
- exception bolster.exceptions.DataNotFoundError(message, url=None, source=None)[source]
Bases:
DataSourceErrorRaised when expected data publications or URLs are not found.
Examples
Publication page returns 404
Expected Excel file link missing from page
RSS feed returns no entries
API endpoint returns empty response
- Parameters:
Initialize DataSourceError with message and optional context.
- exception bolster.exceptions.ValidationError(message, data_info=None, validation_type=None)[source]
Bases:
DataSourceErrorRaised when data fails integrity validation checks.
Examples
Required columns missing from DataFrame
Data values outside expected ranges
Inconsistent data relationships
Empty datasets when data expected
- Parameters:
Initialize ValidationError with message and optional validation context.
- exception bolster.exceptions.ParseError(message, file_path=None, parser_type=None)[source]
Bases:
DataSourceErrorRaised when file or data parsing fails.
Examples
Malformed Excel file structure
Unexpected CSV format
HTML parsing issues
JSON decode errors
- Parameters:
Initialize ParseError with message and optional parsing context.
- exception bolster.exceptions.NetworkError(message, url=None, status_code=None, retry_count=None)[source]
Bases:
DataSourceErrorRaised when network operations fail beyond retry limits.
Examples
Timeout errors after retries
Connection refused
DNS resolution failures
Server returning persistent errors (500, 503)
- Parameters:
Initialize NetworkError with message and optional network context.