We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE



An event handler that will be called when an error occurs. This is most often because an invalid request ID was passed into webRequest.filterResponseData().

After this event is fired, the webRequest.StreamFilter.error property will contain a message giving more information about the error.

Note that this event is not triggered for network errors.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic support No No5757 No


This example adds an onerror listener which logs the value of webRequest.StreamFilter.error.

function listener(details) {
  let filter = browser.webRequest.filterResponseData("12345");

  filter.onerror = event => {
    console.log(`Error: ${filter.error}`);

  return {};

  {urls: ["<all_urls>"], types: ["main_frame"]},

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,