Better error handling
This commit is contained in:
@@ -152,9 +152,14 @@ func (g *GithubIssues) issuesService() {
|
||||
continue
|
||||
}
|
||||
|
||||
go func() {
|
||||
res := g.agent.Ask(
|
||||
agent.WithConversationHistory(messages),
|
||||
)
|
||||
if res.Error != nil {
|
||||
slog.Error("Error asking", "error", res.Error)
|
||||
return
|
||||
}
|
||||
|
||||
_, _, err := g.client.Issues.CreateComment(
|
||||
g.agent.Context(),
|
||||
@@ -164,7 +169,8 @@ func (g *GithubIssues) issuesService() {
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
slog.Info("Error creating comment", err)
|
||||
slog.Error("Error creating comment", "error", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user