@beforeyoubid/exception-handler
v1.0.3
Published
Lambda exception handler through Sentry
Downloads
12
Keywords
Readme
Sentry Lambda Exception Handler
This npm module can be used to wrap over the existing lambda function. When it's enabled, it will capture all exceptions and report to Sentry.
Installation
yarn add @beforeyoubid/exception-handler
We follow 12-factors and we can enable this using environment variables.
SENTRY_DSN=https://[email protected]/zzzz
Usage by Using Lambda Asynchronous Handler
import { asyncSentryHandler } from '@beforeyoubid/exception-handler';
export default asyncSentryHandler(serverless(app));
Usage by Using Lambda Callback Handler
import { callbackSentryHandler } from '@beforeyoubid/exception-handler';
export default callbackSentryHandler(serverless(app));