MCPcopy Index your code
hub / github.com/lingodotdev/lingo.dev / createPreviousErrorContext

Function createPreviousErrorContext

packages/cli/src/cli/utils/errors.ts:160–168  ·  view source on GitHub ↗
(errorDetails: ErrorDetail[])

Source from the content-addressed store, hash-verified

158
159// Utility to create previous error context for fatal errors
160export function createPreviousErrorContext(errorDetails: ErrorDetail[]) {
161 if (errorDetails.length === 0) return undefined;
162
163 return {
164 count: errorDetails.length,
165 types: [...new Set(errorDetails.map((e) => e.type))],
166 buckets: [...new Set(errorDetails.map((e) => e.bucket).filter(Boolean))],
167 };
168}
169
170// Utility to create aggregated error analytics
171export function aggregateErrorAnalytics(

Callers 1

i18n.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected