MCPcopy Create free account
hub / github.com/TanStack/cli / captureCommandFailed

Method captureCommandFailed

packages/cli/src/telemetry.ts:278–300  ·  view source on GitHub ↗
(
    command: string,
    durationMs: number,
    error: unknown,
  )

Source from the content-addressed store, hash-verified

276 }
277
278 async captureCommandFailed(
279 command: string,
280 durationMs: number,
281 error: unknown,
282 ) {
283 if (!this.enabled || !this.distinctId) {
284 return
285 }
286
287 await postEvent('command_failed', this.distinctId, <TelemetryProperties>cleanProperties({
288 ...this.baseProperties(),
289 ...this.commandProperties,
290 command,
291 duration_ms: durationMs,
292 error_code: getErrorCode(error),
293 result: 'failed',
294 steps: this.completedSteps.map((step) => ({
295 duration_ms: step.durationMs,
296 id: step.id,
297 type: step.type,
298 })),
299 }))
300 }
301
302 private baseProperties() {
303 return {

Callers 2

runWithTelemetryFunction · 0.80
telemetry.test.tsFile · 0.80

Calls 4

basePropertiesMethod · 0.95
postEventFunction · 0.85
cleanPropertiesFunction · 0.85
getErrorCodeFunction · 0.85

Tested by

no test coverage detected