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

Function isFontResourceError

packages/engine/src/services/frameCapture.ts:501–507  ·  view source on GitHub ↗
(type: string, text: string, locationUrl: string)

Source from the content-addressed store, hash-verified

499 * of which form Chrome emits.
500 */
501export function isFontResourceError(type: string, text: string, locationUrl: string): boolean {
502 if (type !== "error") return false;
503 if (!text.startsWith("Failed to load resource")) return false;
504 return /fonts\.googleapis|fonts\.gstatic|\.(woff2?|ttf|otf)(\b|$)/i.test(
505 `${locationUrl} ${text}`,
506 );
507}
508
509export function formatConsoleDiagnostic(
510 type: string,

Callers 2

formatConsoleDiagnosticFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected