diff options
author | Grail Finder <wohilas@gmail.com> | 2025-03-10 20:51:00 +0300 |
---|---|---|
committer | Grail Finder (aider) <wohilas@gmail.com> | 2025-03-10 20:51:00 +0300 |
commit | d04fbc792eba0443025fb3f264e108007562009b (patch) | |
tree | 4a4c01e7e1e44dd08eb4aceab1bf48bca67a45fc /bot.go | |
parent | cbd850bda87f83eaa314ba58dea897bafd941f74 (diff) |
refactor: Improve error logging and add comment for error handling in sendMsgToLLM
Diffstat (limited to 'bot.go')
-rw-r--r-- | bot.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -186,10 +186,12 @@ func sendMsgToLLM(body io.Reader) { } content, stop, err = chunkParser.ParseChunk(line) if err != nil { - logger.Error("error parsing response body", "error", err, "line", string(line), "url", cfg.CurrentAPI) + logger.Error("error parsing response body", "error", err, + "line", string(line), "url", cfg.CurrentAPI) streamDone <- true break } + // here line can contain some error msg; if it does we should log it and break from loop; ai! if stop { if content != "" { logger.Warn("text inside of finish llmchunk", "chunk", content, "counter", counter) |