MCPcopy Create free account
hub / github.com/arctic-cli/interface / formatError

Function formatError

packages/arctic/src/auth/antigravity-oauth/debug.ts:194–203  ·  view source on GitHub ↗

* Converts unknown error-like values into printable strings.

(error: unknown)

Source from the content-addressed store, hash-verified

192 * Converts unknown error-like values into printable strings.
193 */
194function formatError(error: unknown): string {
195 if (error instanceof Error) {
196 return error.stack ?? error.message;
197 }
198 try {
199 return JSON.stringify(error);
200 } catch {
201 return String(error);
202 }
203}
204
205/**
206 * Returns the logs directory inside the arctic config folder.

Callers 2

logResponseBodyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected