@@ -136,8 +136,12 @@ function parseRequest(
136136}
137137
138138/** JSDoc */
139- export function requestHandler ( ) : ( req : http . ClientRequest , res : http . ServerResponse , next : ( ) => void ) => void {
140- return function sentryRequestMiddleware ( req : http . ClientRequest , _res : http . ServerResponse , next : ( ) => void ) : void {
139+ export function requestHandler ( ) : ( req : http . IncomingMessage , res : http . ServerResponse , next : ( ) => void ) => void {
140+ return function sentryRequestMiddleware (
141+ req : http . IncomingMessage ,
142+ _res : http . ServerResponse ,
143+ next : ( ) => void ,
144+ ) : void {
141145 const local = domain . create ( ) ;
142146 const hub = getHubFromCarrier ( req ) ;
143147 hub . bindClient ( getCurrentHub ( ) . getClient ( ) ) ;
@@ -169,13 +173,13 @@ function getStatusCodeFromResponse(error: MiddlewareError): number {
169173/** JSDoc */
170174export function errorHandler ( ) : (
171175 error : MiddlewareError ,
172- req : http . ClientRequest ,
176+ req : http . IncomingMessage ,
173177 res : http . ServerResponse ,
174178 next : ( error : MiddlewareError ) => void ,
175179) => void {
176180 return function sentryErrorMiddleware (
177181 error : MiddlewareError ,
178- req : http . ClientRequest ,
182+ req : http . IncomingMessage ,
179183 _res : http . ServerResponse ,
180184 next : ( error : MiddlewareError ) => void ,
181185 ) : void {
0 commit comments