aws / aws-extensions-for-dotnet-cli

Extensions to the dotnet CLI to simplify the process of building and publishing .NET Core applications to AWS services
Apache License 2.0
369 stars 86 forks source link

Improve error reporting used by the VS Toolkit #281

Closed normj closed 1 year ago

normj commented 1 year ago

Description of changes: Rework in the DeployFunctionCommand and DeployServerlessCommand to replace usages of return false when there is an error to abort the deployment to throw a LambdaToolsException instead. This gives the toolkit better insight what actually went wrong and allows them to display a prompt with the error message.

All exceptions are eventually trapped at the base method called by the CLI or Toolkit so returning exceptions instead of returning false will have no introduce surprise failures.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.