Release Service Errors¶
consortium.server.exceptions.service_exceptions.release_service_exceptions
¶
Exception hierarchy:
ReleaseServiceError(message='', detail=None)
¶
Bases: BaseServiceError
Base exception for all errors that occur within the release 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 = 'RELEASE_SERVICE_ERROR'
class-attribute
instance-attribute
¶
ReleaseFileError(message='', detail=None)
¶
Bases: ReleaseServiceError
Base exception for every failure to get the release JSON file's data off disk.
Catch this to handle "the release information could not be loaded" without caring
why. To distinguish a filesystem fault from a bad file, catch
ReleaseFileSystemError or ReleaseFileContentError instead.
code = 'RELEASE_FILE_ERROR'
class-attribute
instance-attribute
¶
ReleaseFileSystemError(operation, path, underlying_error)
¶
Bases: ReleaseFileError
Raised when the release JSON file cannot be read from disk.
This covers every way the filesystem can refuse the operation: the file does not
exist, the process lacks the required permissions, the configured path points at a
directory, the underlying storage fails. They share one type because no caller can
act differently on any of them: whatever the cause, the release information could
not be loaded, and the specific cause is carried in message and detail for
whoever has to fix it.
This is a server side fault or misconfiguration: the release JSON file path is fixed at server startup and never taken from a client, so a failure here reflects the state of the machine the server is running on, the path it was configured with, or a bug in the code that supplied that path.
A file the filesystem hands over successfully but whose contents are wrong is
reported separately, through ReleaseFileContentError.
code = 'RELEASE_FILE_SYSTEM_ERROR'
class-attribute
instance-attribute
¶
ReleaseFileContentError(message='', detail=None)
¶
Bases: ReleaseFileError
Base exception for all errors that occur when the release JSON file's contents are wrong.
The filesystem handed the file's bytes over successfully, so this is fixed by correcting the file rather than by changing the state of the machine or the configured path.
code = 'RELEASE_FILE_CONTENT_ERROR'
class-attribute
instance-attribute
¶
ReleaseFileEncodingError(path, underlying_error)
¶
Bases: ReleaseFileContentError
Raised when the release JSON file's bytes cannot be decoded as UTF-8.
code = 'RELEASE_FILE_ENCODING_ERROR'
class-attribute
instance-attribute
¶
ReleaseFileJSONError(path)
¶
Bases: ReleaseFileContentError
Raised when the release JSON file does not contain valid JSON data.
code = 'RELEASE_FILE_JSON_ERROR'
class-attribute
instance-attribute
¶
ReleaseFileSchemaError(path, validation_error_message)
¶
Bases: ReleaseFileContentError
Raised when the release JSON file does not conform to the expected schema.