@beforeyoubid/exception-handler
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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://xxxx@yyyy.ingest.sentry.io/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));

Dependents (0)

Package Sidebar

Install

npm i @beforeyoubid/exception-handler

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

5.69 kB

Total Files

10

Last publish

Collaborators

  • cayob
  • ben-byb
  • akram-byb
  • shiwam-byb
  • dmitrii8723
  • chainat-byb
  • mitch_byb