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.
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 aLambdaToolsException
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.