onError method
When an error event is send on the stream, the onError handler is called.
Implementation
@override
Future<void> onError(Object? error) async =>
await onDataPoint(DataPoint.fromData(ErrorDatum(error.toString()))
..carpHeader.dataFormat = DataFormat.fromString(CAMSDataType.ERROR)
..carpHeader.studyId = deployment.studyDeploymentId
..carpHeader.userId = deployment.userId);