Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/serverless/src/awslambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,10 @@ export function wrapHandler<TEvent, TResult>(
transaction.finish();
hub.popScope();
await flush(options.flushTimeout).catch(e => {
// logging regardless of ignoreSentryErrors makes it possible to detect issues with sentry
// using logs; otherwise, things like oversized payloads fail completely silently.
logger.error(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.error(e);
IS_DEBUG_BUILD && logger.error(e);

if (options.ignoreSentryErrors && e instanceof SentryError) {
IS_DEBUG_BUILD && logger.error(e);
return;
}
throw e;
Expand Down