Open clstokes opened 4 years ago
Here's another example of the detailed error message not being provided in non-debug output.
Error message
azure:appservice:Plan (prod-ui-plan):
error: deleting urn:pulumi:prod::prod::azure:appservice/plan:Plan::prod-ui-plan: Error deleting App Service Plan "prod-ui-plan" (Resource Group "prod"): web.AppServicePlansClient#Delete: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=<nil> <nil>
Debug Error Message
debug: {"Code":"Conflict","Message":"Server farm 'prod-ui-plan' cannot be deleted because it has web app(s) prod-ui assigned to it.","Target":null,"Details":[{"Message":"Server farm 'prod-ui-plan' cannot be deleted because it has web app(s) prod-ui assigned to it."},{"Code":"Conflict"},{"ErrorEntity":{"ExtendedCode":"11003","MessageTemplate":"Server farm '{0}' cannot be deleted because it has web app(s) {1} assigned to it.","Parameters":["prod-ui-plan","prod-ui"],"Code":"Conflict","Message":"Server farm 'prod-ui-plan' cannot be deleted because it has web app(s) prod-ui assigned to it."}}],"Innererror":null}
Note: stack and resource names have been obfuscated so disregard any inconsistencies there.
@stack72 @mikhailshilkov thoughts on this one? This causes a fair bit of trouble and frustration for our users that hit this.
Agreed that's very annoying. @stack72 do you know where we swallow this and whether we could easily improve?
When an update to
azure.core.TemplateDeployment
fails, the error message emitted doesn't include the detailed error message from the Azure API so the user has very little information to troubleshoot with. Re-running with--debug
provides the actual error message that provides the root cause.Output
Output with
--debug
Code to reproduce
https://gist.github.com/clstokes/298bc0ab59d98a4401f477c8cc9f07fe
Suggestion
Provide the inner errors details in the normal non-debug output.