Handling errors while processing plans