sdfsdfdsf

This commit is contained in:
spiduler
2020-10-22 10:35:43 +09:00
parent 7c604ed2a0
commit 478492187e
2 changed files with 17 additions and 18 deletions

View File

@@ -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 {