MCPcopy Create free account
hub / github.com/github/copilot-sdk / formatError

Function formatError

nodejs/test/e2e/harness/sdkTestHelper.ts:99–111  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

97}
98
99export function formatError(error: unknown): string {
100 if (error instanceof Error) {
101 return String(error);
102 } else if (typeof error === "object" && error !== null) {
103 try {
104 return JSON.stringify(error);
105 } catch {
106 return "[object with circular reference]";
107 }
108 } else {
109 return String(error);
110 }
111}
112
113export function getNextEventOfType(
114 session: CopilotSession,

Callers 5

rmDirFunction · 0.90
retryFunction · 0.85

Calls 1

StringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…