Skip to content

Commit

Permalink
expose goto error reason (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalkington-brado committed May 16, 2022
1 parent 8bb086e commit b17c1db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/goto/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ module.exports = ({

await Promise.all(prePromises.concat(applyEvasions))

const { value: response } = await run({
const { value: response, reason: error } = await run({
fn: html ? page.setContent(html, args) : page.goto(url, args),
timeout: gotoTimeout,
debug: html ? 'html' : 'url'
Expand Down Expand Up @@ -413,7 +413,7 @@ module.exports = ({
await waitUntilAuto(page, { response, timeout: actionTimeout * 2 })
}

return { response, device }
return { response, device, error }
}

goto.getDevice = getDevice
Expand Down

0 comments on commit b17c1db

Please sign in to comment.