Skip to content

Commit

Permalink
Improve AWS bundle validation errors (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzei authored Aug 16, 2023
1 parent cdd5b63 commit b235e01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upstream/upaws/provision_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (pd *DeployData) Validate() error {

if len(pd.Manifest.AWSLambda.Functions) != len(pd.LambdaFunctions) {
result = multierror.Append(result,
errors.New("different number of functions in the manifest and in the bundle"))
errors.Errorf("different number of functions in the manifest and in the bundle: expected %d, found %d", len(pd.Manifest.AWSLambda.Functions), len(pd.LambdaFunctions)))
}

for _, function := range pd.Manifest.AWSLambda.Functions {
Expand All @@ -213,11 +213,11 @@ func (pd *DeployData) Validate() error {
}
if data.Handler != function.Handler {
result = multierror.Append(result,
errors.New("mismatched handler"))
errors.Errorf("mismatched handler: expected %s, found %s", function.Handler, data.Handler))
}
if data.Runtime != function.Runtime {
result = multierror.Append(result,
errors.New("mismatched runtime"))
errors.Errorf("mismatched runtime: expected %s, found %s", function.Runtime, data.Runtime))
}
}

Expand Down

0 comments on commit b235e01

Please sign in to comment.