Skip to content

Commit

Permalink
Add error handling for Generate method in NewIgnorePolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mizutani committed Dec 23, 2024
1 parent 369c75f commit 7777054
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/usecase/new_ignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func NewIgnorePolicy(ctx context.Context,

alertSlugPrompts := append([]string{alertSlugPrompt}, alertDataSet...)
slugResp, err := genAI.Generate(ctx, alertSlugPrompts...)
if err != nil {
return err
}
alertSlug := strings.TrimSpace(slugResp[0])
logger.Info("Generated slug", "slug", alertSlug)

Expand Down

0 comments on commit 7777054

Please sign in to comment.