Skip to content

Commit c38b939

Browse files
authored
Add APIStatusError handler
1 parent 70c8be7 commit c38b939

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/seclab_taskflow_agent/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ async def _run_streamed():
379379
async_task=async_task,
380380
task_id=task_id)
381381
logging.error(f"Bad Request: {e}")
382+
except APIStatusError as e:
383+
await render_model_output(f"** 🤖❗ API Status Error: {e}\n",
384+
async_task=async_task,
385+
task_id=task_id)
386+
logging.error(f"Bad Request: {e}")
382387

383388
if async_task:
384389
await flush_async_output(task_id)

0 commit comments

Comments
 (0)