dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.16k stars 794 forks source link

fix: return 500 Internal Server Error on python error #1796

Open paneidos opened 3 weeks ago

paneidos commented 3 weeks ago

Description

Return a 500 Internal Server Error when the Python handler raises an error

Motivation and Context

When (Python) code raises an error, AWS Lambda returns a 500 with a generic JSON response. With this change the behaviour of Serverless Offline is more inline with AWS Lambda.

How Has This Been Tested?

Added an automated test for Python.

Screenshots (if appropriate):