expect error snippet