@@ -136,8 +136,12 @@ function parseRequest(
136
136
}
137
137
138
138
/** 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 {
141
145
const local = domain . create ( ) ;
142
146
const hub = getHubFromCarrier ( req ) ;
143
147
hub . bindClient ( getCurrentHub ( ) . getClient ( ) ) ;
@@ -169,13 +173,13 @@ function getStatusCodeFromResponse(error: MiddlewareError): number {
169
173
/** JSDoc */
170
174
export function errorHandler ( ) : (
171
175
error : MiddlewareError ,
172
- req : http . ClientRequest ,
176
+ req : http . IncomingMessage ,
173
177
res : http . ServerResponse ,
174
178
next : ( error : MiddlewareError ) => void ,
175
179
) => void {
176
180
return function sentryErrorMiddleware (
177
181
error : MiddlewareError ,
178
- req : http . ClientRequest ,
182
+ req : http . IncomingMessage ,
179
183
_res : http . ServerResponse ,
180
184
next : ( error : MiddlewareError ) => void ,
181
185
) : void {
0 commit comments