When an error event is send on the stream, the onError handler is called.
@override Future<void> onError(Object? error) async => await onMeasurement( Measurement.fromData(Error(message: error.toString())));