figured out what is until
This commit is contained in:
2
index.js
2
index.js
@@ -63,7 +63,7 @@ process.on('SIGTERM', exitHandler.bind(null, { cleanup: true }));
|
||||
* request handler
|
||||
*/
|
||||
app.post('/', async (req, res, next) => {
|
||||
const requestPage = () => browser.real(req.body.url).then(html => res.send(html)).catch(e => {
|
||||
const requestPage = () => browser.get(req.body.uri, req.body.waitElement).then(html => res.send(html)).catch(e => {
|
||||
if(e instanceof NoSuchSessionError) {
|
||||
browser.reset()
|
||||
logger.error({ reason: e.message, url: req.url }, 'Browser session expired')
|
||||
|
||||
Reference in New Issue
Block a user