MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / shouldIgnoreRequestFailure

Function shouldIgnoreRequestFailure

packages/cli/src/commands/validate.ts:37–49  ·  view source on GitHub ↗
(
  url: string,
  errorText: string | undefined,
  resourceType?: string,
)

Source from the content-addressed store, hash-verified

35const MEDIA_EXTENSIONS = /\.(aac|flac|m4a|mov|mp3|mp4|oga|ogg|wav|webm)$/i;
36
37export function shouldIgnoreRequestFailure(
38 url: string,
39 errorText: string | undefined,
40 resourceType?: string,
41): boolean {
42 if (errorText !== "net::ERR_ABORTED") return false;
43 if (resourceType === "media") return true;
44 try {
45 return MEDIA_EXTENSIONS.test(new URL(url).pathname);
46 } catch {
47 return false;
48 }
49}
50
51async function getCompositionDuration(page: import("puppeteer-core").Page): Promise<number> {
52 return page.evaluate(() => {

Callers 2

validateInBrowserFunction · 0.85
validate.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected