(#393) - Move yankError as its only used in one place