First step: Enum.each is only useful when you don’t care about the results - switching to Enum.map will get you a list of {:ok, %Vote{}} | {:error, changeset} tuples.
From that, you can parse out if there were any errors.
Also consider what you want to happen to Vote records that are successfully inserted in the same request with a Vote that gets an error; should they be rolled back? Consider using a Repo.transaction block or an Ecto.Multi to coordinate saving multiple rows.