Skip to content

Commit 7eaf461

Browse files
authored
chore: Fix bug in changelog about runWithAsyncContext (#7873)
1 parent 82763b7 commit 7eaf461

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you want to manually add async context isolation to your application, you can
2424
import * as Sentry from '@sentry/node';
2525

2626
const requestHandler = (ctx, next) => {
27-
return new Promise((resolve) => {
27+
return new Promise((resolve, reject) => {
2828
Sentry.runWithAsyncContext(async () => {
2929
const hub = Sentry.getCurrentHub();
3030

@@ -38,7 +38,11 @@ const requestHandler = (ctx, next) => {
3838
)
3939
);
4040

41-
await next();
41+
try {
42+
await next();
43+
} catch (err) {
44+
reject(err);
45+
}
4246
resolve();
4347
});
4448
});

0 commit comments

Comments
 (0)