Recommended Free Tools
Call statusText() on Puppeteer’s HTTPResponse object:
const statusText = response.statusText();
console.log(statusText); // e.g. "OK"
It returns the response’s human-readable status phrase as a string. In Puppeteer 25.12.0, the API reference says a successful response is usually “OK,” but the phrase is not guaranteed to be the same for every server response.
As an Amazon Associate I earn from qualifying purchases.
Get the status text from a navigation response
Navigation methods such as page.goto() return an HTTPResponse when the navigation receives an HTTP response. Call statusText() on that object:
const response = await page.goto('https://example.com');
if (response) {
console.log(response.statusText());
}
Check that response exists before calling a method. Some navigations, including a navigation to about:blank or a same-URL hash change, may not produce a response.
#1 Best Overall
Read status text from every response event
A page’s response event supplies an HTTPResponse when a response is received. Register a listener before starting the action whose responses you want to inspect:
page.on('response', response => {
console.log(response.url(), response.statusText());
});
await page.goto('https://example.com');
This handler runs for responses to page requests, not only the main document. Use response.url() or other response details if you need to identify which request the phrase belongs to.
Rank #2
Status text, status code, and success are different
| Method | Returns | Use it for |
|---|---|---|
statusText() |
A string, such as OK |
Displaying or logging the response’s human-readable phrase. |
status() |
A number, such as 200 |
Checking a specific HTTP status code. |
ok() |
A boolean | Checking whether the status falls in the 200–299 range. |
Use the numeric status or ok() for conditional logic. A status phrase is descriptive text, not a reliable substitute for checking the code.
HTTP error responses are not request failures
An HTTP response with status 404 or 503 is still a response. Puppeteer’s event model does not treat an HTTP error code as a failed request by itself; the requestfailed event is for request failures such as a timeout. Inspect status() or ok() to detect an HTTP error response.
page.on('response', response => {
if (!response.ok()) {
console.log('HTTP error:', response.status(), response.statusText(), response.url());
}
});
Troubleshooting
responseis null: The operation may not have produced an HTTP response. Check for this before callingstatusText().- You need to detect errors: Do not test the wording returned by
statusText(). Use!response.ok()for non-2xx statuses or compareresponse.status()with a specific code. - Your handler does not report a 404 as a request failure: That is expected. A 404 is an HTTP response; inspect it in the
responsehandler usingstatus()orok(). - You see no response text for a request: A timeout or other request failure may produce no HTTP response. Handle the request failure separately rather than expecting
statusText()to be available.
Or skip the browser setup
If you need a website screenshot rather than Puppeteer response metadata, ScreenshotNeo can return an image or PDF with one GET request. Before capture it accepts consent banners and removes known consent platforms, newsletter popups, and chat widgets. Bot checks, blank pages, and failed loads are never billed; an MCP server lets AI agents take screenshots; and 1,000 screenshots a month are free with no card, with paid plans starting at $5 for 3,000.
See the ScreenshotNeo API documentation for request options. Example:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Sign up for free to get 1,000 screenshots a month with no card.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Best Value
- Used Book in Good Condition
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




