recordOperationFailed method

void recordOperationFailed(
  1. String operationType,
  2. String error
)

Record operation failed

Implementation

void recordOperationFailed(String operationType, String error) {
  _operationsFailed++;
  _errorCounts[error] = (_errorCounts[error] ?? 0) + 1;

  _emitEvent(SyncMetricEvent(
    type: 'operation_failed',
    data: {
      'total_failed': _operationsFailed,
      'operation_type': operationType,
      'error': error,
    },
  ));
}