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

Function normalizeDiagnosticMessage

packages/core/src/runtime/init.ts:276–288  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

274 const MAX_DIAGNOSTIC_MESSAGE_LENGTH = 240;
275
276 const normalizeDiagnosticMessage = (value: unknown): string => {
277 if (value instanceof Error) {
278 return value.message || String(value);
279 }
280 if (typeof value === "string") {
281 return value;
282 }
283 try {
284 return JSON.stringify(value);
285 } catch {
286 return String(value ?? "");
287 }
288 };
289
290 const classifyRuntimeScriptFailure = (
291 rawMessage: string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected