Skip to content

Commit 60662f0

Browse files
committed
Enable bluebird long stack traces only in SLS_DEBUG mode
1 parent ebdc522 commit 60662f0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bin/serverless

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ const initializeErrorReporter = require('../lib/utils/sentry').initializeErrorRe
1010

1111
Error.stackTraceLimit = Infinity;
1212

13-
BbPromise.config({
14-
longStackTraces: true,
15-
});
13+
if (process.env.SLS_DEBUG) {
14+
// For performance reasons enabled only in SLS_DEBUG mode
15+
BbPromise.config({
16+
longStackTraces: true,
17+
});
18+
}
1619

1720
process.on('unhandledRejection', (e) => {
1821
logError(e);

0 commit comments

Comments
 (0)