exception
frequenz.client.base.exception ¤
Exceptions raised by an API client.
Classes¤
frequenz.client.base.exception.ApiClientError ¤
Bases: Exception
There was an error in an API client.
To simplify retrying, errors are classified as retryable, or not. Retryable errors might succeed if retried, while permanent errors won't. When uncertain, errors are assumed to be retryable.
The following sub-classes are available:
- GrpcError: A gRPC operation failed.
Source code in frequenz/client/base/exception.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
Attributes¤
description
instance-attribute
¤
description = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
description
|
A human-readable description of the error.
TYPE:
|
retryable
|
Whether retrying the operation might succeed.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.ClientNotConnected ¤
Bases: ApiClientError
The client is not connected to the server.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.DataLoss ¤
Bases: GrpcError
Unrecoverable data loss or corruption.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.EntityAlreadyExists ¤
Bases: GrpcError
The entity that we attempted to create already exists.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.EntityNotFound ¤
Bases: GrpcError
The requested entity was not found.
Note that this error differs from PermissionDenied. This error is used when the requested entity is not found, regardless of the user's permissions.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.GrpcError ¤
Bases: ApiClientError
The gRPC server returned an error with a status code.
These errors are specific to gRPC. If you want to use the client in a protocol-independent way, you should avoid catching this exception. Catching subclasses that don't have grpc in their name should be protocol-independent.
The following sub-classes are available:
- DataLoss: Unrecoverable data loss or corruption.
- EntityAlreadyExists: The entity that we attempted to create already exists.
- EntityNotFound: The requested entity was not found.
- InternalError: Some invariants expected by the underlying system have been broken.
- InvalidArgument: The client specified an invalid argument.
- OperationAborted: The operation was aborted.
- OperationCancelled: The operation was cancelled.
- OperationNotImplemented: The operation is not implemented or not supported/enabled in this service.
- OperationOutOfRange: The operation was attempted past the valid range.
- OperationPreconditionFailed: The operation was rejected because the system is not in a required state.
- OperationTimedOut: The time limit was exceeded while waiting for the operation to complete.
- OperationUnauthenticated: The request does not have valid authentication credentials for the operation.
- PermissionDenied: The caller does not have permission to execute the specified operation.
- ResourceExhausted: Some resource has been exhausted (for example per-user quota, disk space, etc.).
- ServiceUnavailable: The service is currently unavailable.
- UnknownError: There was an error that can't be described using other statuses.
- UnrecognizedGrpcStatus: The gRPC server returned an unrecognized status code.
References
Source code in frequenz/client/base/exception.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
description: str,
grpc_error: AioRpcError,
retryable: bool
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
description
|
A human-readable description of the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
retryable
|
Whether retrying the operation might succeed.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.InternalError ¤
Bases: GrpcError
Some invariants expected by the underlying system have been broken.
This error code is reserved for serious errors.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.InvalidArgument ¤
Bases: GrpcError
, ValueError
The client specified an invalid argument.
Note that this error differs from OperationPreconditionFailed. This error indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationAborted ¤
Bases: GrpcError
The operation was aborted.
Typically due to a concurrency issue or transaction abort.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationCancelled ¤
Bases: GrpcError
The operation was cancelled.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationNotImplemented ¤
Bases: GrpcError
The operation is not implemented or not supported/enabled in this service.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationOutOfRange ¤
Bases: GrpcError
The operation was attempted past the valid range.
Unlike InvalidArgument, this error indicates a problem that may be fixed if the system state changes.
There is a fair bit of overlap with OperationPreconditionFailed, this error is just a more specific version of that error and could be the result of an operation that doesn't even take any arguments.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationPreconditionFailed ¤
Bases: GrpcError
The operation was rejected because the system is not in a required state.
For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. The user should perform some corrective action before retrying the operation.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationTimedOut ¤
Bases: GrpcError
The time limit was exceeded while waiting for the operationt o complete.
For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.OperationUnauthenticated ¤
Bases: GrpcError
The request does not have valid authentication credentials for the operation.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.PermissionDenied ¤
Bases: GrpcError
The caller does not have permission to execute the specified operation.
Note that when the operation is rejected due to other reasons, such as the resources being exhausted or the user not being authenticated at all, different errors should be catched instead (ResourceExhausted and OperationUnauthenticated respectively).
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.ResourceExhausted ¤
Bases: GrpcError
Some resource has been exhausted (for example per-user quota, disk space, etc.).
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.ServiceUnavailable ¤
Bases: GrpcError
The service is currently unavailable.
This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.UnknownError ¤
Bases: GrpcError
There was an error that can't be described using other statuses.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |
Source code in frequenz/client/base/exception.py
frequenz.client.base.exception.UnrecognizedGrpcStatus ¤
Bases: GrpcError
The gRPC server returned an unrecognized status code.
Source code in frequenz/client/base/exception.py
Attributes¤
description
instance-attribute
¤
description: str = description
The human-readable description of the error.
is_retryable
instance-attribute
¤
Whether retrying the operation might succeed.
server_url
instance-attribute
¤
server_url = server_url
The URL of the server that returned the error.
Functions¤
__init__ ¤
__init__(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> None
Create a new instance.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error originating this exception.
TYPE:
|
Source code in frequenz/client/base/exception.py
from_grpc_error
classmethod
¤
from_grpc_error(
*,
server_url: str,
operation: str,
grpc_error: AioRpcError
) -> GrpcError
Create an instance of the appropriate subclass from a gRPC error.
PARAMETER | DESCRIPTION |
---|---|
server_url
|
The URL of the server that returned the error.
TYPE:
|
operation
|
The operation that caused the error.
TYPE:
|
grpc_error
|
The gRPC error to convert.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GrpcError
|
An instance of GrpcError if the gRPC status is not recognized, or an appropriate subclass if it is. |