handle errors at the highest point