handle errors from planning