Skip to content

Commit

Permalink
log all caught errors
Browse files Browse the repository at this point in the history
  • Loading branch information
louisholley committed Jan 9, 2024
1 parent df5c418 commit 6cf6c7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ const performCanvasCapture = async (page, canvasSelector) => {
const pureBase64 = base64.replace(/^data:image\/png;base64,/, "")
return Buffer.from(pureBase64, "base64")
} catch (err) {
console.log(err)
throw ERRORS.CANVAS_CAPTURE_FAILED
}
}
Expand Down Expand Up @@ -387,6 +388,7 @@ exports.handler = async (event, context) => {
})
console.log(`navigated to URL with response status: ${response.status()}`);
} catch (err) {
console.log(err)
if (err && err.name && err.name === "TimeoutError") {
throw ERRORS.TIMEOUT
} else {
Expand Down

0 comments on commit 6cf6c7f

Please sign in to comment.