There are two types of failures in deployments.

  1. Normal expected failures; like build failed or custom script failed.  This kind of failures will not throw exception.
  2. Unexpected failures such as git operation failures.   This will throw exception.

Regardless, the deployment status will be marked as failure.  Having said this, one options is for vfs to treat everything as (1) meaning try/catch/trace.    User will need to go thru deployments api/ui to see if the deployment is successful.   Another option, if this contract supports result indicating success but deployment failure, then vfs should always look at deployment status (IDeploymentStatusManger) and see if it is successful and inform users accordingly.