Honor res.statusCode change in listener