Hi,
I’ve been trying to diagnose an issue with “bound” account variables in a web app deployment step and I just wanted to call out that the error message could be improved with a little tweak…
I short, I was getting the following error message when attempting to deploy a web app where I’d “bound” the account name to a project-level variable scoped per environment.
There was a problem with your request.
Couldn't find an account with the Id azureserviceprincipal-spn-myaccount. Perhaps the account has been deleted? Either select another account, or create a new account and select it.
Once you have corrected these problems you can try again.
If the problem is related to a variable you will need to update the variables for this release or recreate the release for the changes to take effect.
If the problem is related to the deployment process you will need to create a new release for the changes to take effect.
After checking everything a few times, I refreshed the browser with Fiddler running and saw this response:
{
"ErrorMessage": "There was a problem with your request.",
"Errors": [
"Couldn't find an account with the Id \nazureserviceprincipal-spn-myaccount. Perhaps the account has been deleted? Either select another account, or create a new account and select it.\r\nOnce you have corrected these problems you can try again.\r\nIf the problem is related to a variable you will need to update the variables for this release or recreate the release for the changes to take effect.\r\nIf the problem is related to the deployment process you will need to create a new release for the changes to take effect."
],
"ParsedHelpLinks": []
}
Note the “\n” at the start of the account name - what I’d managed to do somehow was cut&paste the variable name from another project but included a line break!
Once I looked at it in this light, it was obvious there was a line break in the bound value:
it would be useful if the error message showed the value escaped and quoted - e.g.
Couldn't find an account with the Id "\nazureserviceprincipal-spn-myaccount".
Not a major problem, and one I can avoid by being a bit more careful with my cut and paste keys, but it might stop other people scratching their heads in future…
Cheers,
M