raise error if it's not what we're expecting