Event Hooks Service Errors¶
consortium.server.exceptions.service_exceptions.event_hooks_service_exceptions
¶
Exception hierarchy:
BaseServiceErrorEventHooksServiceErrorEventHookNotFoundErrorEventHookLoadingErrorInvalidEventHookManifestFileErrorInvalidEventHookPyProjectFileErrorInvalidEventHookPyProjectFileTOMLErrorInvalidEventHookPyProjectFileDependencyErrorInvalidEventHookDirectoryStructureErrorInvalidEventHookImplementationErrorIncompatibleEventHookFrameworkVersionErrorEventHookAlreadyRegisteredErrorDuplicateEventHookLabelError
EventHookDependencyErrorEventHookOperationErrorEventHookDiscoveryFileSystemError
The loading, dependency, and registry exceptions below carry no __init__ of their own: they
are constructed by the shared component loader/registry pipeline with the generic component
keyword arguments (component_directory, component_str, component_id, ...) inherited from
their components_service_exceptions base. Only the operation errors, which are raised directly
by the event hook registry with a bespoke message, define their own constructor.
EventHookDiscoveryFileSystemError also carries no __init__ of its own: it inherits the
operation/path/underlying_error constructor from ComponentDiscoveryFileSystemError so it
plugs directly into the shared wrap_filesystem_errors helper.
EventHooksServiceError(message='', detail=None)
¶
Bases: BaseServiceError
Base exception for all errors that occur within the event hooks service.
Attributes:
| Name | Type | Description |
|---|---|---|
code |
A stable machine-readable string identifying the specific error. |
|
message |
str
|
A human-readable description of what went wrong and, where possible, how to resolve it. |
detail |
dict[str, JsonValue] | None
|
Optional structured context about the error, or None when there is none. |
code = 'EVENT_HOOKS_SERVICE_ERROR'
class-attribute
instance-attribute
¶
EventHookNotFoundError(component_id)
¶
Bases: EventHooksServiceError, ComponentNotFoundError
Raised when the requested event hook with the provided event hook ID was not found in the event hooks service.
code = 'EVENT_HOOK_NOT_FOUND_ERROR'
class-attribute
instance-attribute
¶
EventHookLoadingError(**kwargs)
¶
Bases: EventHooksServiceError, ComponentLoadingError
Base exception for all errors that occur during the loading of an event hook.
code = 'EVENT_HOOK_LOADING_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookManifestFileError(**kwargs)
¶
Bases: EventHookLoadingError, InvalidComponentManifestFileError
Base exception for all errors that occur due to an invalid event hook manifest file during event hook loading.
code = 'INVALID_EVENT_HOOK_MANIFEST_FILE_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookManifestFileJSONError(component_directory)
¶
Bases: InvalidEventHookManifestFileError, InvalidComponentManifestFileJSONError
Raised when the event hook manifest file is not valid JSON during event hook loading.
code = 'INVALID_EVENT_HOOK_MANIFEST_FILE_JSON_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookManifestFileSchemaError(component_directory, json_schema_error_message)
¶
Bases: InvalidEventHookManifestFileError, InvalidComponentManifestFileSchemaError
Raised when the event hook manifest file does not conform to the expected JSON schema during event hook loading.
code = 'INVALID_EVENT_HOOK_MANIFEST_FILE_SCHEMA_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookPyProjectFileError(**kwargs)
¶
Bases: EventHookLoadingError, InvalidComponentPyProjectFileError
Base exception for all errors that occur due to an invalid pyproject.toml file
during event hook loading.
code = 'INVALID_EVENT_HOOK_PYPROJECT_FILE_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookPyProjectFileTOMLError(component_directory)
¶
Bases: EventHookLoadingError, InvalidComponentPyProjectFileTOMLError
Raised when the pyproject.toml file is not a valid TOML file during event hook loading.
code = 'INVALID_EVENT_HOOK_PYPROJECT_FILE_TOML_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookPyProjectFileDependencyError(component_directory, invalid_dependency_entry)
¶
Bases: EventHookLoadingError, InvalidComponentPyProjectFileDependencyError
Raised when the pyproject.toml file contains an invalid dependency entry during
event hook loading.
code = 'INVALID_EVENT_HOOK_PYPROJECT_FILE_DEPENDENCY_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookDirectoryStructureError(**kwargs)
¶
Bases: EventHookLoadingError, InvalidComponentDirectoryStructureError
Base exception for all errors that occur due to an invalid event hook directory structure during event hook loading.
code = 'INVALID_EVENT_HOOK_DIRECTORY_STRUCTURE_ERROR'
class-attribute
instance-attribute
¶
EventHookManifestFileNotFoundError(component_directory)
¶
Bases: InvalidEventHookDirectoryStructureError, ComponentManifestFileNotFoundError
Raised when the event hook manifest file is not found in the event hook directory during event hook loading.
code = 'EVENT_HOOK_MANIFEST_FILE_NOT_FOUND_ERROR'
class-attribute
instance-attribute
¶
EventHookEntryPointModuleNotFoundError(component_directory, entry_point_module)
¶
Bases: InvalidEventHookDirectoryStructureError, ComponentEntryPointModuleNotFoundError
Raised when the event hook entry point module specified in the manifest file is not found in the event hook directory during event hook loading.
code = 'EVENT_HOOK_ENTRY_POINT_MODULE_NOT_FOUND_ERROR'
class-attribute
instance-attribute
¶
InvalidEventHookImplementationError(**kwargs)
¶
Bases: EventHookLoadingError, InvalidComponentImplementationError
Base exception for all errors that occur due to the event hook not implementing the required interface during event hook loading.
code = 'INVALID_EVENT_HOOK_IMPLEMENTATION_ERROR'
class-attribute
instance-attribute
¶
EventHookSymbolNotFoundError(component_directory, entry_point_symbol, entry_point_module)
¶
Bases: InvalidEventHookImplementationError, ComponentSymbolNotFoundError
Raised when the event hook symbol name specified in the manifest file is not found in the event hook entry point module during event hook loading.
code = 'EVENT_HOOK_SYMBOL_NOT_FOUND_ERROR'
class-attribute
instance-attribute
¶
EventHookInterfaceError(component_directory, entry_point_symbol)
¶
Bases: InvalidEventHookImplementationError, ComponentInterfaceError
Raised when the event hook class does not implement the required interface during event hook loading.
code = 'EVENT_HOOK_INTERFACE_ERROR'
class-attribute
instance-attribute
¶
InternalEventHookError(component_directory, internal_error_message)
¶
Bases: InvalidEventHookImplementationError, InternalComponentError
Raised when an unhandled exception from within the event hook is raised during event hook loading.
code = 'INTERNAL_EVENT_HOOK_ERROR'
class-attribute
instance-attribute
¶
IncompatibleEventHookFrameworkVersionError(component_str, required_version, current_version)
¶
Bases: EventHookLoadingError, IncompatibleComponentFrameworkVersionError
Raised when an event hook's required framework version is incompatible with the current framework version during event hook loading.
code = 'INCOMPATIBLE_EVENT_HOOK_FRAMEWORK_VERSION_ERROR'
class-attribute
instance-attribute
¶
EventHookAlreadyRegisteredError(component_str, component_id)
¶
Bases: EventHookLoadingError, ComponentAlreadyRegisteredError
Raised when an event hook with the same ID is already registered in the event hooks service during event hook loading.
code = 'EVENT_HOOK_ALREADY_REGISTERED_ERROR'
class-attribute
instance-attribute
¶
DuplicateEventHookLabelError(component_str, label)
¶
Bases: EventHookLoadingError, DuplicateComponentLabelError
Raised when the label provided in the event hook's definition is already in use by another event hook during event hook loading.
code = 'DUPLICATE_EVENT_HOOK_LABEL_ERROR'
class-attribute
instance-attribute
¶
EventHookDependencyError(**kwargs)
¶
Bases: EventHooksServiceError, ComponentDependencyError
Base exception for all errors that occur during the resolution of event hook dependencies.
code = 'EVENT_HOOK_DEPENDENCY_ERROR'
class-attribute
instance-attribute
¶
ThirdPartyDependencyNotFoundError(component_directory, third_party_dependency_name)
¶
Bases: EventHookDependencyError, ThirdPartyDependencyNotFoundError
Raised when a third-party dependency required by an event hook is not installed during event hook dependency resolution.
code = 'THIRD_PARTY_DEPENDENCY_NOT_FOUND_ERROR'
class-attribute
instance-attribute
¶
IncompatibleThirdPartyDependencyVersionError(component_directory, third_party_dependency_name, required_version, installed_version)
¶
Bases: EventHookDependencyError, IncompatibleThirdPartyDependencyVersionError
Raised when a third-party dependency's installed version is incompatible with the version required by the event hook during event hook dependency resolution.
code = 'INCOMPATIBLE_THIRD_PARTY_DEPENDENCY_VERSION_ERROR'
class-attribute
instance-attribute
¶
ComponentDependencyNotFoundError(component_str, missing_dependency)
¶
Bases: EventHookDependencyError, ComponentDependencyNotFoundError
Raised when an event hook dependency required by the event hook is not found in the event hooks service during event hook dependency resolution.
code = 'COMPONENT_DEPENDENCY_NOT_FOUND_ERROR'
class-attribute
instance-attribute
¶
IncompatibleComponentDependencyVersionError(component_str, incompatible_dependency, required_version, installed_version)
¶
Bases: EventHookDependencyError, IncompatibleComponentDependencyVersionError
Raised when an event hook dependency's version is incompatible with the version required by the event hook during event hook dependency resolution.
code = 'INCOMPATIBLE_COMPONENT_DEPENDENCY_VERSION_ERROR'
class-attribute
instance-attribute
¶
EventHookDependsOnInvalidComponentDependencyError(component_str, invalid_dependency)
¶
Bases: EventHookDependencyError, ComponentDependsOnInvalidComponentDependencyError
Raised when an event hook depends on another event hook that itself has invalid dependencies during event hook dependency resolution.
code = 'EVENT_HOOK_DEPENDS_ON_INVALID_COMPONENT_DEPENDENCY_ERROR'
class-attribute
instance-attribute
¶
ComponentDependencyNotRunningError(component_str, not_running_dependency)
¶
Bases: EventHookDependencyError, ComponentDependencyNotRunningError
Raised when an event hook dependency required by the event hook is present but not currently running during event hook dependency resolution.
code = 'COMPONENT_DEPENDENCY_NOT_RUNNING_ERROR'
class-attribute
instance-attribute
¶
EventHookOperationError(message='', detail=None)
¶
Bases: EventHooksServiceError
Base exception for all errors that occur during the operation of a particular event hook.
code = 'EVENT_HOOK_OPERATION_ERROR'
class-attribute
instance-attribute
¶
EventHookSetupError(event_hook_str, error_message, detail=None)
¶
Bases: EventHookOperationError
Raised when an event hook fails to set up during event hook operation.
code = 'EVENT_HOOK_SETUP_ERROR'
class-attribute
instance-attribute
¶
EventHookTriggerError(event_hook_str, error_message, detail=None)
¶
Bases: EventHookOperationError
Raised when an event hook fails while handling a triggered event during event hook operation.
code = 'EVENT_HOOK_TRIGGER_ERROR'
class-attribute
instance-attribute
¶
EventHookTeardownError(event_hook_str, error_message, detail=None)
¶
Bases: EventHookOperationError
Raised when an event hook fails to tear down during event hook operation.
code = 'EVENT_HOOK_TEARDOWN_ERROR'
class-attribute
instance-attribute
¶
EventHookDiscoveryFileSystemError(operation, path, underlying_error)
¶
Bases: EventHooksServiceError, ComponentDiscoveryFileSystemError
Raised when a recursive filesystem scan for event hooks fails at the filesystem level.