Skip to main content
Module

x/puppeteer/mod.ts>HTTPRequest#failure

A port of puppeteer running on Deno
Latest
method HTTPRequest.prototype.failure
Re-export
import { HTTPRequest } from "https://deno.land/x/puppeteer@16.2.0/mod.ts";

Access information about the request's failure.

Examples

Example of logging all failed requests:

page.on('requestfailed', request => {
  console.log(request.url() + ' ' + request.failure().errorText);
});

Returns

{ errorText: string; } | null

null unless the request failed. If the request fails this can return an object with errorText containing a human-readable error message, e.g. net::ERR_FAILED. It is not guaranteed that there will be failure text if the request fails.