serverless-plugin-simulate icon indicating copy to clipboard operation
serverless-plugin-simulate copied to clipboard

fix response header when lambda function returns errorMessage

Open ezequielm opened this issue 7 years ago • 0 comments

What did you implement:

Closes #101

How did you implement it:

When lambda function returns an errorMessage (that means the function handle the error) the invoke/local not reject the promise and registry/invoke set the correct header (X-Amz-Function-Error) for response of lambda invoke

How can we verify it:

  1. Go to examples folder, and start simulating lambda
  2. Open a new terminal and run aws lambda invoke --function-name docker-dev-lambdaError outfile.txt --endpoint-url http://localhost:4000

Todos:

  • [x] Write tests
  • [x] Write documentation
  • [x] Fix linting errors
  • [x] Provide verification config/commands/resources
  • [x] Change ready for review message below

Is this ready for review?: YES

ezequielm avatar Sep 04 '18 21:09 ezequielm