The frame details that can be retrieved using the recently landed |webNavigation.getFrame/getAllFrames| should support an errorOccurred boolean field, from https://developer.chrome.com/extensions/webNavigation: boolean errorOccurred True if the last navigation in this frame was interrupted by an error, i.e. the onErrorOccurred event fired.
In the initial prototype of |webNavigation.getFrame/getAllFrames|, |errorOccurred| was retrieved through the usage of the following constants: // NOTE: Compute the Error Page loadType value. (See Bug 1190685 for rationale) // - LOAD_CMD_NORMAL (as defined in "docshell/base/nsIDocShell.idl"): // - LOAD_FLAGS_ERROR_PAGE (as defined in "docshell/base/nsDocShellLoadTypes.h") // - MAKE_LOAD_TYPE (as defined in "docshell/base/nsDocShellLoadTypes.h") // - LOAD_ERROR_PAGE (as defined in "docshell/base/nsDocShellLoadTypes.h") const LOAD_CMD_NORMAL = Ci.nsIDocShell.LOAD_CMD_NORMAL; const LOAD_FLAGS_ERROR_PAGE = 0x1; const MAKE_LOAD_TYPE = (type, flags) => (type | (flags << 16)); const LOAD_ERROR_PAGE = MAKE_LOAD_TYPE(LOAD_CMD_NORMAL, LOAD_FLAGS_ERROR_PAGE); ... let errorOccurred = (docShell.loadType == LOAD_ERROR_PAGE); Unfortunately the LOAD_ERROR_PAGE constant is defined in "docshell/base/nsDocShellLoadTypes.h" and it is not exported in any of the idl files. If exporting LOAD_ERROR_PAGE constant in the |nsIDocShell.idl| file is not an option, another strategy to build the knowledge needed to being able to populate |errorOccurred| in the frame details is keeping track of the docShells where we are already detecting and sending the |onErrorOccurred| webNavigation event in a WeakMap. Unfortunately this strategy will work only for docShells where the error occurred after the first addon with the webNavigation permission and a subscribed webNavigation event (because it will enable the WebProgressListener in the webNavigation frame script which will keep track/untrack of the errorOccurred docShells).
Luca - please move higher if this is a high priority - but looked like a P3, can wait until post 48