sdfsdfdsf
This commit is contained in:
5
index.js
5
index.js
@@ -63,10 +63,7 @@ process.on('SIGTERM', exitHandler.bind(null, { cleanup: true }));
|
||||
* request handler
|
||||
*/
|
||||
app.post('/', async (req, res, next) => {
|
||||
browser.get(req.body).then(html => {
|
||||
if (html) res.send(html)
|
||||
else throw new Error('Emtpy html')
|
||||
}).catch(e => {
|
||||
browser.get(req.body).then(html => res.send(html)).catch(e => {
|
||||
if (e instanceof NoSuchSessionError) {
|
||||
logger.error({ reason: e.message, url: req.url }, 'Browser session expired')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user