summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-12-06 15:12:41 +0300
committerGrail Finder <wohilas@gmail.com>2025-12-06 15:12:41 +0300
commit0f3baa4f8b2e158e446ba93d83b1b9c19a96bb1d (patch)
tree830ea0751f569aa51dea4f56be6a87fc5c099c1e
parentb0400612bb44fb26b11cbed30a7a781dd69477a8 (diff)
Enha: notify user on llm resp error
-rw-r--r--bot.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot.go b/bot.go
index bd1ce3f..3a78011 100644
--- a/bot.go
+++ b/bot.go
@@ -285,6 +285,9 @@ func sendMsgToLLM(body io.Reader) {
if err != nil {
logger.Error("error parsing response body", "error", err,
"line", string(line), "url", cfg.CurrentAPI)
+ if err := notifyUser("LLM Response Error", "Failed to parse LLM response: "+err.Error()); err != nil {
+ logger.Error("failed to notify user", "error", err)
+ }
streamDone <- true
break
}