Console error

In browser testing, a console error is a message a web page writes to the browser's developer console when something in it fails: a script that threw, a resource that could not load, a request the server rejected or a security policy that blocked something. It is the page's own account of what went wrong, and it exists whether or not anything visible changed.

The longer version

The console collects output from several sources. The JavaScript engine logs uncaught exceptions and unhandled promise rejections with a stack trace. The network layer logs failed resource loads and blocked requests with their status. The browser logs violations of its own rules, such as mixed content or a content security policy refusing a script. And the application logs whatever its developers chose to, at error, warning or info level. A tester reading the console after a broken action usually finds the cause named there, in the order it happened.

This page is about the error as evidence, not about the console.error() method that JavaScript developers call to write one; most search results for the term document that method. Nearest to a console error is a console warning, which flags something deprecated or suspicious that did not stop anything. Errors are the ones that correlate with a broken page. A silent failure, where the button does nothing and the screen shows no message, usually has a console error behind it.

The error is lost because the person who saw the bug never opened the console, and by the time a developer asks, the page has been reloaded and the console cleared. The report says the form did not submit; the console said a script threw on a null property at a named line. Without that line the developer reproduces the page state from a description. Console errors also mislead when treated as a checklist: a page can log errors from a third-party tag that has no bearing on the bug, so the useful reading is the error that appears at the moment of the failure.

Common questions

What is the difference between a console error and a console warning?

A console error records something that failed: a thrown exception, a resource that did not load, a request the server rejected. A warning records something the browser wants a developer to know about, such as a deprecated API or an unusual configuration, that did not stop execution. Errors correlate with broken behaviour; warnings usually do not.

Should every console error be reported as a bug?

A console error is evidence, not a defect in itself. The one that appears at the moment a page misbehaves is the lead; errors from analytics tags or browser extensions that fire on every page are noise. Reporting the error alongside the visible symptom, rather than instead of it, is what makes the report actionable.

How do you find console errors as a tester?

Open the browser's developer tools before performing the failing action, switch to the console panel, then reproduce the bug and read what appears at that moment. Preserving the log across navigation keeps errors that would otherwise be cleared on a redirect. Tools that capture the console automatically remove the need to remember this step.

What information does a console error contain?

A console error carries the error message, the source file with its line and column, and for a thrown exception a stack trace listing the functions that were running. A failed resource load shows the URL and the status the server returned. A blocked request names the policy that blocked it. Together they usually point at a line of code or a specific request.

Can a console error appear without anything visibly breaking?

A console error can appear with no visible symptom at all. A third-party tag failing to load, an analytics call rejected by an ad blocker or a script erroring after the page has already rendered leaves the screen intact. The reverse also holds: a page can look broken with an empty console when the fault is in CSS or in data the server returned. The error is evidence, read against the moment of failure.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">