iopipe / serverless-plugin-iopipe

Automatically wrap your serverless framework functions with IOpipe
https://www.iopipe.com
Apache License 2.0
40 stars 8 forks source link

Wrap imports instead of handlers #55

Closed kolanos closed 6 years ago

kolanos commented 6 years ago

The plugin should wrap handlers as imports to catch any runtime errors that occur outside of the handler itself.

Example:

const iopipe = require('@iopipe/iopipe')();

module.exports = iopipe((event, context) => require('./handler')(event, context));