Latest
method HTTPRequest.prototype.failure
import { HTTPRequest } from "https://dotland.deno.dev/x/puppeteer@16.2.0/vendor/puppeteer-core/puppeteer/types.d.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.