5050)
5151from ._connection import Connection
5252from ._constants import RECEIVER_MAX_SIZE
53- from ._exception import ClientError
53+ from ._exception import ApiClientError
5454from ._metadata import Location , Metadata
5555
5656DEFAULT_GRPC_CALL_TIMEOUT = 60.0
@@ -105,7 +105,7 @@ async def components(self) -> Iterable[Component]:
105105 Iterator whose elements are all the components in the microgrid.
106106
107107 Raises:
108- ClientError : If the are any errors communicating with the Microgrid API,
108+ ApiClientError : If the are any errors communicating with the Microgrid API,
109109 most likely a subclass of
110110 [GrpcError][frequenz.client.microgrid.GrpcError].
111111 """
@@ -120,7 +120,7 @@ async def components(self) -> Iterable[Component]:
120120 ),
121121 )
122122 except grpc .aio .AioRpcError as grpc_error :
123- raise ClientError .from_grpc_error (
123+ raise ApiClientError .from_grpc_error (
124124 server_url = self ._server_url ,
125125 operation = "ListComponents" ,
126126 grpc_error = grpc_error ,
@@ -192,7 +192,7 @@ async def connections(
192192 Microgrid connections matching the provided start and end filters.
193193
194194 Raises:
195- ClientError : If the are any errors communicating with the Microgrid API,
195+ ApiClientError : If the are any errors communicating with the Microgrid API,
196196 most likely a subclass of
197197 [GrpcError][frequenz.client.microgrid.GrpcError].
198198 """
@@ -211,7 +211,7 @@ async def connections(
211211 ),
212212 )
213213 except grpc .aio .AioRpcError as grpc_error :
214- raise ClientError .from_grpc_error (
214+ raise ApiClientError .from_grpc_error (
215215 server_url = self ._server_url ,
216216 operation = "ListConnections" ,
217217 grpc_error = grpc_error ,
@@ -419,7 +419,7 @@ async def set_power(self, component_id: int, power_w: float) -> None:
419419 power_w: power to set for the component.
420420
421421 Raises:
422- ClientError : If the are any errors communicating with the Microgrid API,
422+ ApiClientError : If the are any errors communicating with the Microgrid API,
423423 most likely a subclass of
424424 [GrpcError][frequenz.client.microgrid.GrpcError].
425425 """
@@ -432,7 +432,7 @@ async def set_power(self, component_id: int, power_w: float) -> None:
432432 ),
433433 )
434434 except grpc .aio .AioRpcError as grpc_error :
435- raise ClientError .from_grpc_error (
435+ raise ApiClientError .from_grpc_error (
436436 server_url = self ._server_url ,
437437 operation = "SetPowerActive" ,
438438 grpc_error = grpc_error ,
@@ -454,7 +454,7 @@ async def set_bounds(
454454 Raises:
455455 ValueError: when upper bound is less than 0, or when lower bound is
456456 greater than 0.
457- ClientError : If the are any errors communicating with the Microgrid API,
457+ ApiClientError : If the are any errors communicating with the Microgrid API,
458458 most likely a subclass of
459459 [GrpcError][frequenz.client.microgrid.GrpcError].
460460 """
@@ -477,7 +477,7 @@ async def set_bounds(
477477 ),
478478 )
479479 except grpc .aio .AioRpcError as grpc_error :
480- raise ClientError .from_grpc_error (
480+ raise ApiClientError .from_grpc_error (
481481 server_url = self ._server_url ,
482482 operation = "AddInclusionBounds" ,
483483 grpc_error = grpc_error ,
0 commit comments