Skip to content

Commit ea2c0af

Browse files
authored
use then(null, e rather than catch(e
1 parent 870ccce commit ea2c0af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/node/src/handlers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export function requestHandler(
410410
.then(() => {
411411
_end.call(this, chunk, encoding, cb);
412412
})
413-
.catch(e => {
413+
.then(null, e => {
414414
logger.error(e);
415415
_end.call(this, chunk, encoding, cb);
416416
});
@@ -488,11 +488,11 @@ export function errorHandler(options?: {
488488
*/
489489
shouldHandleError?(error: MiddlewareError): boolean;
490490
}): (
491-
error: MiddlewareError,
492-
req: http.IncomingMessage,
493-
res: http.ServerResponse,
494-
next: (error: MiddlewareError) => void,
495-
) => void {
491+
error: MiddlewareError,
492+
req: http.IncomingMessage,
493+
res: http.ServerResponse,
494+
next: (error: MiddlewareError) => void,
495+
) => void {
496496
return function sentryErrorMiddleware(
497497
error: MiddlewareError,
498498
_req: http.IncomingMessage,

0 commit comments

Comments
 (0)