MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / friendlyError

Function friendlyError

dashboard/lcm/src/helpers.ts:110–116  ·  view source on GitHub ↗
(err: any)

Source from the content-addressed store, hash-verified

108 * "Failed to fetch") when the server is unreachable. Failed fetches must
109 * render error UI, never zero-data UI, so this string is shown prominently. */
110export function friendlyError(err: any): string {
111 const raw = String((err && err.message) || err || "Request failed");
112 if (/failed to fetch|networkerror|load failed|network request/i.test(raw)) {
113 return "Can't reach the tracedecay server";
114 }
115 return raw;
116}
117
118/** Append rows from a paginated follow-up fetch, de-duplicated by id, so
119 * server-offset pagination can never double-render a row. */

Callers 2

StoreHealthCardFunction · 0.90
AppFunction · 0.90

Calls 1

testMethod · 0.80

Tested by

no test coverage detected