better deploy error handling