mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 10:46:06 +00:00
fix(engine): ignore benign media request aborts (#2423)
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
isFontResourceError,
|
||||
isDrawElementVerificationError,
|
||||
sanitizeDiagnosticUrl,
|
||||
shouldIgnoreRequestFailureDiagnostic,
|
||||
} from "./frameCapture.js";
|
||||
|
||||
describe("isFontResourceError", () => {
|
||||
@@ -224,6 +225,37 @@ describe("navigation diagnostics", () => {
|
||||
}),
|
||||
).toBe("[Browser:HTTP403] GET https://cdn.example.com/frame.png resource=image Forbidden");
|
||||
});
|
||||
|
||||
it("ignores benign media aborts without hiding real request failures", () => {
|
||||
expect(
|
||||
shouldIgnoreRequestFailureDiagnostic({
|
||||
resourceType: "media",
|
||||
url: "http://127.0.0.1:4173/assets/video.mp4",
|
||||
failureText: "net::ERR_ABORTED",
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldIgnoreRequestFailureDiagnostic({
|
||||
resourceType: "other",
|
||||
url: "http://127.0.0.1:4173/assets/audio.oga?cache=1",
|
||||
failureText: "net::ERR_ABORTED",
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldIgnoreRequestFailureDiagnostic({
|
||||
resourceType: "media",
|
||||
url: "http://127.0.0.1:4173/assets/video.mp4",
|
||||
failureText: "net::ERR_FAILED",
|
||||
}),
|
||||
).toBe(false);
|
||||
expect(
|
||||
shouldIgnoreRequestFailureDiagnostic({
|
||||
resourceType: "script",
|
||||
url: "http://127.0.0.1:4173/assets/app.js",
|
||||
failureText: "net::ERR_ABORTED",
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("DrawElementVerificationError details", () => {
|
||||
|
||||
Reference in New Issue
Block a user