@@ -291,13 +291,12 @@ func (a *anthropicClient) send(ctx context.Context, messages []message.Message,
291291 )
292292 // If there is an error we are going to see if we can retry the call
293293 if err != nil {
294− slog.Error("Anthropic API error", "error", err.Error(), "attempt", attempts, "max_retries", maxRetries)
295294 retry, after, retryErr := a.shouldRetry(attempts, err)
296295 if retryErr != nil {
297296 return nil, retryErr
298297 }
299298 if retry {
300− slog.Warn("Retrying due to rate limit", "attempt", attempts, "max_retries", maxRetries)
299+ slog.Warn("Retrying due to rate limit", "attempt", attempts, "max_retries", maxRetries, "error", err)
301300 select {
302301 case <-ctx.Done():
303302 return nil, ctx.Err()
@@ -446,7 +445,7 @@ func (a *anthropicClient) stream(ctx context.Context, messages []message.Message
446445 return
447446 }
448447 if retry {
449− slog.Warn("Retrying due to rate limit", "attempt", attempts, "max_retries", maxRetries)
448+ slog.Warn("Retrying due to rate limit", "attempt", attempts, "max_retries", maxRetries, "error", err)
450449 select {
451450 case <-ctx.Done():
452451 // context cancelled