Handle exceptions and call Invocation Error endpoint
jberger opened this issue · comments
Hi, I'm just checking out this layer and it seems incredibly helpful! Thanks for providing it.
While reading the code I notice that you don't handle exceptions but rather rely on it calling the default script exception handler. Have you considered using an eval block around the function call to trap exceptions and report them to https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html#runtimes-api-invokeerror . Indeed after that you might want to do the same with the require statement to catch compile errors too.
Anyway, thanks a lot and I expect I'll be using this layer going forward! Cheers.
@jberger Oops, I'm so sorry, I overlooked this issue.
I've just modified to deal with it on the layer and published the new layer.
- arn:aws:lambda:${REGION}:652718333417:layer:perl-5_26-layer:7
- arn:aws:lambda:${REGION}:652718333417:layer:perl-5_28-layer:(5|6)
- arn:aws:lambda:${REGION}:652718333417:layer:perl-5_30-layer:2
Thank you for the information!