Skip to content

Commit

Permalink
Merge pull request #417 from aws-samples/lvn
Browse files Browse the repository at this point in the history
feat: add exception handler
  • Loading branch information
NingLu authored Oct 28, 2024
2 parents 186f193 + b00de06 commit dab8084
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def stream_response(event_body:dict, response:dict):
ws_connection_id = event_body["ws_connection_id"]
custom_message_id = event_body["custom_message_id"]
answer = response["answer"]
figure = response.get("ddb_additional_kwargs").get("figure")
figure = response.get("ddb_additional_kwargs", {}).get("figure")
if isinstance(answer, str):
answer = iter([answer])

Expand Down
Loading

0 comments on commit dab8084

Please sign in to comment.