Skip to content

Events Service Errors

consortium.server.exceptions.service_exceptions.events_service_exceptions

Exception hierarchy:

EventsServiceError(message='', detail=None)

Bases: BaseServiceError

Base exception for all errors that occur within the events 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 = 'EVENTS_SERVICE_ERROR' class-attribute instance-attribute

EventHandlerAlreadyRegisteredError(event_type)

Bases: EventsServiceError

Raised when the provided event handler is already registered for the specified event type in the events service.

code = 'EVENT_HANDLER_ALREADY_REGISTERED_ERROR' class-attribute instance-attribute

EventHandlerNotRegisteredError(event_type)

Bases: EventsServiceError

Raised when the requested event handler is not registered for the specified event type in the events service.

code = 'EVENT_HANDLER_NOT_REGISTERED_ERROR' class-attribute instance-attribute

InvalidEventTypeError(event_type)

Bases: EventsServiceError

Raised when the provided event type does not correspond to a valid EventType member.

code = 'INVALID_EVENT_TYPE_ERROR' class-attribute instance-attribute