10000 ADK changes · PaveLuchkov/adk-python@6454029 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6454029

Browse files
wyf7107copybara-github
authored andcommitted
ADK changes
PiperOrigin-RevId: 750287732
1 parent 7cc3167 commit 6454029

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/google/adk/cli/fast_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,12 @@ async def process_messages():
756756
except Exception as e:
757757
logger.exception("Error during live websocket communication: %s", e)
758758
traceback.print_exc()
759+
WEBSOCKET_INTERNAL_ERROR_CODE = 1011
760+
WEBSOCKET_MAX_BYTES_FOR_REASON = 123
761+
await websocket.close(
762+
code=WEBSOCKET_INTERNAL_ERROR_CODE,
763+
reason=str(e)[:WEBSOCKET_MAX_BYTES_FOR_REASON],
764+
)
759765
finally:
760766
for task in pending:
761767
task.cancel()

0 commit comments

Comments
 (0)
0