Add input validation for userId and channelPreferences, and enhance error reporting for Novu API calls by returning detailed results for each channel update.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Modify the Supabase function to iterate through channel preferences and update each individually using the Novu SDK, including error handling for each channel update.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8c5cf3e-a80e-462f-b090-b081acdcf03a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint