Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browser-script-errors

Checks for browser resource errors when accessing websites

How to install

npm install
npx playwright install

How to run

node main.js "https://<your website>" headless=false timeout=2000
  • where headless sets the browser context
  • where timeout in milliseconds to wait for page events and redirects

Sample file output

Writes to ./results/<domain>--<contextPath>-<timestamp>.json

{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "scanTime": "2025-04-22T09:22:38.786Z",
  "statusCode": "200",
  "consoleErrors": [
    {
      "errorType": "error",
      "location": "https://example.com/api/user",
      "line": 0,
      "message": "Failed to load resource: the server responded with a status of 401 ()",
      "timestamp": "2025-04-22T09:22:39.941Z",
      "url": "https://example.com/"
    }
  ],
  "resourceErrors": [
    {
      "errorType": "resourceResponseError",
      "message": "https://example.com/api/user - Status: 401",
      "timestamp": "2025-04-22T09:22:39.941Z",
      "statusCode": "401",
      "url": "https://example.com/api/user"
    }
  ]
}

About

Checks for browser resource errors when accessing websites

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages