Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(serverless): new options for ignoring sentry errors #4755

Merged
merged 8 commits into from
Feb 24, 2022
13 changes: 13 additions & 0 deletions src/platforms/node/guides/aws-lambda/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ exports.handler = Sentry.AWSLambda.wrapHandler(() => {
// `first` and `second` errors are captured
```

## Ignore Sentry errors
ichina marked this conversation as resolved.
Show resolved Hide resolved
_(New in version 6.17.10)_
AbhiPrasad marked this conversation as resolved.
Show resolved Hide resolved

By default, Sentry fails lambda invocation if it unable to send reports to the server.
ichina marked this conversation as resolved.
Show resolved Hide resolved
In this case, even if all reported errors were handled and your handler executed successfully, Sentry will fail whole lambda invocation.
ichina marked this conversation as resolved.
Show resolved Hide resolved

The `ignoreSentryErrors` (default: `false`) option ignores all the errors raised by Sentry

```javascript {tabTitle:ignoreSentryErrors}
exports.handler = Sentry.AWSLambda.wrapHandler(yourHandler, { ignoreSentryErrors: true });
// it will ignore any errors raised by sentry sdk on attempt to send reports to the server
ichina marked this conversation as resolved.
Show resolved Hide resolved
```

## Behavior

With the AWS Lambda integration enabled, the Node SDK will:
Expand Down