kotless icon indicating copy to clipboard operation
kotless copied to clipboard

Event can't signal failure

Open bdueck opened this issue 3 years ago • 0 comments

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.

bdueck avatar May 06 '22 15:05 bdueck