Skip to content

Commit 9589a61

Browse files
feat: add logging message if truncation fails
1 parent f1e8ec0 commit 9589a61

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/askui/models/shared/truncation_strategies.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def _summarize_message_history(
133133
)
134134
except Exception as e:
135135
# catch e.g. BadRequestError
136+
error_msg = f"Truncation Failed with error: {e}"
137+
logger.exception(error_msg)
136138
if reporter:
137-
reporter.add_message(
138-
"TruncationStrategy", f"Truncation Failed with error: {e}"
139-
)
139+
reporter.add_message("TruncationStrategy", error_msg)
140140
raise
141141

142142

0 commit comments

Comments
 (0)