Skip to content

Commit

Permalink
more error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Jun 21, 2023
1 parent bfb3f70 commit 01136c9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,16 @@ async function main() {
var minimizeWindow = false
if (process.platform == 'darwin' && waitForVideo) minimizeWindow = true

let browser = await getCurrentBrowser()
const page = await browser.newPage()
//await page.setBypassCSP(true)
//page.on('console', msg => console.log(msg.text()))
try {
let browser = await getCurrentBrowser()
const page = await browser.newPage()
//await page.setBypassCSP(true)
//page.on('console', msg => console.log(msg.text()))
} catch (e) {
console.log('failed to start browser page', u, e)
res.status(500).send(`failed to start browser page: ${e}`)
return
}

try {
const stream = await getStream(page, {
Expand Down

0 comments on commit 01136c9

Please sign in to comment.