handle error during deploy process