Skip to content

Base Service Error

consortium.server.exceptions.service_exceptions.base_service_exception

Exception hierarchy:

BaseServiceError(message='', detail=None)

Bases: Exception

Base exception for all errors raised by the server's services.

Every service level exception derives from this class so that service errors can be caught and handled through a single common type.

Attributes:

Name Type Description
code str

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 JSON-serializable, structured, machine-readable context about the error, or None when there is no such context.

code = 'BASE_SERVICE_ERROR' class-attribute

message = message instance-attribute

detail = detail instance-attribute