Skip to content

Commit

Permalink
fix: DIA-1441: RecursionError better traceback logging (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakan458 authored Oct 1, 2024
1 parent 568a406 commit 952bf76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adala/runtimes/_litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def _format_error_dict(e: Exception) -> dict:
def _log_llm_exception(e) -> dict:
dct = _format_error_dict(e)
base_error = f"Inference error {dct['_adala_message']}"
tb = traceback.format_exc()
tb = "".join(
traceback.format_exception(e)
) # format_exception return list of strings ending in new lines
logger.error(f"{base_error}\nTraceback:\n{tb}")
return dct

Expand Down

0 comments on commit 952bf76

Please sign in to comment.