Called when an error occurs during read.
final void Function(Object error, StackTrace stackTrace)? onError;