The etag only makes sense for a success response which everything where deployment doesn't throw is.

Suwat, thanks for the description. I have changed the flow to have a try/catch around deployment and also to check whether the status is "Success". If not then we return a specific error saying that the deployment failed including the DeployResult.StatusText. The user can then try again.