File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -184,15 +184,17 @@ function makeExpressHandler(appId, promiseHandler) {
184
184
res . status ( status ) ;
185
185
186
186
if ( result . text ) {
187
- return res . send ( result . text ) ;
187
+ res . send ( result . text ) ;
188
+ return next ( ) ;
188
189
}
189
190
190
191
if ( result . location ) {
191
192
res . set ( 'Location' , result . location ) ;
192
193
// Override the default expressjs response
193
194
// as it double encodes %encoded chars in URL
194
195
if ( ! result . response ) {
195
- return res . send ( 'Found. Redirecting to ' + result . location ) ;
196
+ res . send ( 'Found. Redirecting to ' + result . location ) ;
197
+ return next ( ) ;
196
198
}
197
199
}
198
200
if ( result . headers ) {
@@ -201,6 +203,7 @@ function makeExpressHandler(appId, promiseHandler) {
201
203
} )
202
204
}
203
205
res . json ( result . response ) ;
206
+ next ( ) ;
204
207
} , ( e ) => {
205
208
log . error ( `Error generating response. ${ inspect ( e ) } ` , { error : e } ) ;
206
209
next ( e ) ;
You can’t perform that action at this time.
0 commit comments