Add debug logging to ToggleReaction to identify the error
This commit is contained in:
parent
400f4116eb
commit
8c3ca59872
|
|
@ -1095,7 +1095,10 @@ func (r *PostRepository) ToggleReaction(ctx context.Context, postID string, user
|
|||
goto calculate_counts
|
||||
}
|
||||
} else if err != sql.ErrNoRows {
|
||||
log.Error().Err(err).Str("postID", postID).Str("userID", userID).Msg("DEBUG: Failed to check existing reaction - unexpected error")
|
||||
return nil, nil, fmt.Errorf("failed to check existing reaction: %w", err)
|
||||
} else {
|
||||
log.Info().Str("postID", postID).Str("userID", userID).Msg("DEBUG: No existing reaction found (expected)")
|
||||
}
|
||||
|
||||
// Add the new reaction
|
||||
|
|
|
|||
Loading…
Reference in a new issue