(
command: string,
durationMs: number,
error: unknown,
)
| 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 { |
no test coverage detected