MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / errorEventsIn

Function errorEventsIn

e2e/cloud/frontend-error-reporting.test.ts:40–51  ·  view source on GitHub ↗
(body: string)

Source from the content-addressed store, hash-verified

38 * `exception`, so pick those out rather than modelling the whole format.
39 */
40const errorEventsIn = (body: string): ReadonlyArray<ReportedEvent> =>
41 body
42 .split("\n")
43 .filter((line) => line.trim().startsWith("{"))
44 .flatMap((line) => {
45 try {
46 const parsed = JSON.parse(line) as ReportedEvent;
47 return parsed.exception ? [parsed] : [];
48 } catch {
49 return [];
50 }
51 });
52
53scenario(
54 "Frontend errors · a failed API request is reported with a real message",

Calls

no outgoing calls

Tested by

no test coverage detected