fixes #6673 / BZ 1103342 - capsule - add error cases for content sync

This commit adds a couple of error cases for user attempting to:
1. sync a capsule that has no lifecycle environments
2. sync a capsule lifecyle environment that isn't attached to the capsule