Allow access to the original error object (#3252)

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
Shir Serlui 2024-09-15 01:46:09 +03:00 • committed by GitHub
commit f203523b75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -323,6 +323,7 @@ class Client extends EventEmitter {
// remove after 2.3000.x hard release
await page.evaluateOnNewDocument(() => {
const originalError = Error;
window.originalError = originalError;
//eslint-disable-next-line no-global-assign
Error = function (message) {
const error = new originalError(message);