Skip to content

Commit 83be80e

Browse files
committed
bug: handle connection errors in grpc for boser
1 parent 0be9e9d commit 83be80e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyasic/web/braiins_os/boser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def multicommand(
8989
for cmd in tasks:
9090
try:
9191
result[cmd] = await tasks[cmd]
92-
except (GRPCError, APIError):
92+
except (GRPCError, APIError, ConnectionError):
9393
pass
9494

9595
return result
@@ -121,7 +121,7 @@ async def send_command(
121121
metadata = [("authorization", await self.auth())]
122122
return (await endpoint(message, metadata=metadata)).to_pydict()
123123
raise e
124-
except GRPCError as e:
124+
except (GRPCError, ConnectionError) as e:
125125
raise APIError(f"gRPC command failed - {endpoint}") from e
126126

127127
async def auth(self) -> str | None:

0 commit comments

Comments
 (0)