JetBrains / kotless

Kotlin Serverless Framework
Apache License 2.0
1.15k stars 57 forks source link

Event can't signal failure #118

Open bdueck opened 2 years ago

bdueck commented 2 years ago

If an event lambda throws an uncaught exception, this should result in a lambda execution failure and allow normal AWS lambda error management features to track and route the error accordingly (dashboard, alerting, etc.).

Currently, HandlerAWS:handleRequest incorrectly handles exceptions raised by event lambdas. These are actually caught as an HTTP lambda failure and a 500 error is returned. This is incorrect for an event lambda.

HandlerAWS:handleRequest should log and then allow the exception to be rethrown which in turn signals AWS lambda Java wrapper that the lambda execution failed.