catch spurious next===undefined on error