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

Function errorEventsIn

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

Source from the content-addressed store, hash-verified

31 * `exception`, so pick those out rather than modelling the whole format.
32 */
33const errorEventsIn = (body: string): ReadonlyArray<ReportedEvent> =>
34 body
35 .split("\n")
36 .filter((line) => line.trim().startsWith("{"))
37 .flatMap((line) => {
38 try {
39 const parsed = JSON.parse(line) as ReportedEvent;
40 return parsed.exception ? [parsed] : [];
41 } catch {
42 return [];
43 }
44 });
45
46scenario(
47 "Frontend errors · a failed API request is reported without request data",

Calls

no outgoing calls

Tested by

no test coverage detected