bhf_smarthealth.exceptions#

This module contains custom Exception classes for error-handling within the Smart Health pipeline

Exceptions#

SmartHealthBaseException

Base exception class for the Smart Health library

ISODateConversionError

Custom exception raised if a date cannot be converted to ISO 8601 format

RawDataProcessingError

Base exception class for errors processing raw data

DataVolumeError

Custom exception to raise for errors with data volume

JSONStructureError

Custom exception to be raised for if raw JSON does not have the expected keys

MetadataValidationError

Custom exception to be raised for errors whilst validating raw JSON file metadata

DataValidationError

Custom exception to use as a wrapper around pydantic's ValidationError

EmptyFileError

Custom exception to raise if a file contains no usable data

InsufficientValidDataError

Custom exception to raise if a file contains no usable data

Module Contents#

exception bhf_smarthealth.exceptions.SmartHealthBaseException(message: str)[source]#

Bases: Exception

Base exception class for the Smart Health library

exception bhf_smarthealth.exceptions.ISODateConversionError(message: str)[source]#

Bases: SmartHealthBaseException

Custom exception raised if a date cannot be converted to ISO 8601 format

exception bhf_smarthealth.exceptions.RawDataProcessingError(message: str)[source]#

Bases: SmartHealthBaseException

Base exception class for errors processing raw data

exception bhf_smarthealth.exceptions.DataVolumeError(message: str)[source]#

Bases: SmartHealthBaseException

Custom exception to raise for errors with data volume

exception bhf_smarthealth.exceptions.JSONStructureError(message: str)[source]#

Bases: RawDataProcessingError

Custom exception to be raised for if raw JSON does not have the expected keys

exception bhf_smarthealth.exceptions.MetadataValidationError(message: str)[source]#

Bases: RawDataProcessingError

Custom exception to be raised for errors whilst validating raw JSON file metadata

exception bhf_smarthealth.exceptions.DataValidationError(message: str)[source]#

Bases: RawDataProcessingError

Custom exception to use as a wrapper around pydantic’s ValidationError

exception bhf_smarthealth.exceptions.EmptyFileError(message: str)[source]#

Bases: DataVolumeError

Custom exception to raise if a file contains no usable data

exception bhf_smarthealth.exceptions.InsufficientValidDataError(message: str)[source]#

Bases: DataVolumeError

Custom exception to raise if a file contains no usable data