Skip to content

hertzforge.service.protocol

protocol

Names the sds/1 protocol fixes (schema/PROTOCOL.md).

Classes:

Name Description
ProtocolError

A request answered with an error response. message names the cause

Functions:

Name Description
bad_request

An error for a request whose method exists but whose params are

not_found

An error for a dataset, handle, channel or operation that does not

refused

An error for a well-formed request the service will not carry out,

hello

The hello message the server sends first on every connection.

Classes

ProtocolError

ProtocolError(code: str, message: str)

Bases: Exception

A request answered with an error response. message names the cause in words a user can act on.

Functions:

bad_request

bad_request(message: str) -> ProtocolError

An error for a request whose method exists but whose params are wrong.

not_found

not_found(message: str) -> ProtocolError

An error for a dataset, handle, channel or operation that does not exist.

refused

refused(message: str) -> ProtocolError

An error for a well-formed request the service will not carry out, such as an operation run on the wrong kind of dataset.

hello

hello() -> dict

The hello message the server sends first on every connection.