Add error handling when deploy.