Skip to content

Commit 952bf76

Browse files
authored
fix: DIA-1441: RecursionError better traceback logging (#220)
1 parent 568a406 commit 952bf76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adala/runtimes/_litellm.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def _format_error_dict(e: Exception) -> dict:
8484
def _log_llm_exception(e) -> dict:
8585
dct = _format_error_dict(e)
8686
base_error = f"Inference error {dct['_adala_message']}"
87-
tb = traceback.format_exc()
87+
tb = "".join(
88+
traceback.format_exception(e)
89+
) # format_exception return list of strings ending in new lines
8890
logger.error(f"{base_error}\nTraceback:\n{tb}")
8991
return dct
9092

0 commit comments

Comments
 (0)