figured out what is until

This commit is contained in:
spiduler
2020-10-19 19:56:55 +09:00
parent e9ec4ab4ce
commit 645ea995d6
3 changed files with 20 additions and 6 deletions

View File

@@ -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')