Error API¶
Base classes¶
- exception sila2.framework.SilaError(message: str)¶
-
Base class for all errors that can be raised by a SiLA Server. Can not be raised directly.
Concrete error types:
Errors raised by SiLA Clients¶
- exception sila2.framework.SilaConnectionError¶
Bases:
Exception
Any error during SiLA communication that is not actively issued by the SiLA Server or SiLA Client
Notes
This error is raised by the
sila2.client.SilaClient
class when a non-SiLA error is raised
Errors raised by SiLA Servers¶
- exception sila2.framework.DefinedExecutionError(error_node: DefinedExecutionErrorNode, message: str)¶
Bases:
SilaError
Issued by a SiLA Server during command execution, property access, or related to SiLA Client Metadata, that is not a
sila2.framework.DefinedExecutionError
(i.e. not specified in the feature definition).Notes
The code generator generates a DefinedExecutionError subclass for each error defined in a feature.
Server Development: Never use this class directly. Always use the generated error classes.
- Client usage: Client classes generated by the code generator will raise received defined execution errors as
instance of the generated error classes. Dynamic clients (plain
sila2.client.SilaClient
objects) raise instances of this class directly.
- fully_qualified_identifier: FullyQualifiedDefinedExecutionErrorIdentifier¶
Fully qualified error identifier
- exception sila2.framework.ValidationError(message: str)¶
Bases:
SilaError
Issued by a SiLA Server if a SiLA Client sent invalid command parameters
Notes
This error is raised automatically by the SDK if a received parameter violates a constraint defined in the feature definition, or if the SDK could not interpret the parameter message sent by the SiLA Client
- exception sila2.framework.UndefinedExecutionError(message: str)¶
Bases:
SilaError
Any error issued by a SiLA Server during command execution, property access, or related to SiLA Client Metadata, that is not a
sila2.framework.DefinedExecutionError
(i.e. not specified in the feature definition)Notes
When any exception occurs on the server-side that is no
sila2.framework.DefinedExecutionError
or another SiLA error, the SDK will automatically raise it to the SiLA Client as an instance of this class- classmethod from_exception(exception: Exception) UndefinedExecutionError ¶
- exception sila2.framework.CommandExecutionNotAccepted(message: str)¶
Bases:
FrameworkError
Issued when a SiLA Server does not allow the requested command execution
Notes
This is NOT done automatically by the SDK
- exception sila2.framework.CommandExecutionNotFinished(message: str)¶
Bases:
FrameworkError
Issued by a SiLA Server when a SiLA Client is trying to get the command response of an observable command when the command has not been finished yet
Notes
This error is raised automatically by the SDK
- exception sila2.framework.InvalidMetadata(message: str)¶
Bases:
FrameworkError
Issued by a SiLA Server if a SiLA Client did not send the required SiLA Client Metadata, or when the received Metadata was invalid
Notes
This error is raised automatically by the SDK
- exception sila2.framework.NoMetadataAllowed(message: str)¶
Bases:
FrameworkError
Issued by a SiLA Server when receiving a request to the SiLA Service Feature that contains SiLA Client Metadata
Notes
This error is raised automatically by the SDK
- exception sila2.framework.InvalidCommandExecutionUUID(message: str)¶
Bases:
FrameworkError
Issued by a SiLA Server when a SiLA Client is trying to get or subscribe to command execution information, intermediate responses or responses of an observable command with an invalid command execution UUID
Notes
This error is raised automatically by the SDK