Throw error when sync wasn't successful