Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/detectors/signals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ export function attachSignalListeners(deps: SignalDeps): void {
if (fenced.has(req.url())) return;
// A request cancelled before it finished (a restarted navigation, an
// aborted fetch) did not fail: Chromium net::ERR_ABORTED, Firefox
// NS_BINDING_ABORTED, WebKit "cancelled".
// NS_BINDING_ABORTED, WebKit "cancelled" on macOS and "Load request
// cancelled" on Linux.
if (
/ERR_ABORTED|NS_BINDING_ABORTED|^cancelled$|BLOCKED_BY_CLIENT|blockedbyclient/i.test(
/ERR_ABORTED|NS_BINDING_ABORTED|^(?:Load request )?cancelled$|BLOCKED_BY_CLIENT|blockedbyclient/i.test(
errorText,
)
) {
Expand Down
3 changes: 2 additions & 1 deletion test/fence-noise.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ describe(`requests the fence aborts (${browser})`, () => {
describe(`requests cancelled before they finish (${browser})`, () => {
// A double-clicked link restarts its navigation and a page can abort its own
// fetch. Chromium calls that net::ERR_ABORTED, Firefox NS_BINDING_ABORTED,
// WebKit "cancelled"; none of them is a failed request.
// WebKit "cancelled" (macOS) or "Load request cancelled" (Linux); none of
// them is a failed request.
it('are not reported as failed network requests', async () => {
const cfg = await loadConfig({
ignoreConfigFile: true,
Expand Down
Loading