From d2070ad8375fdefa78cba0a3da56479fd35c24a9 Mon Sep 17 00:00:00 2001
From: Jan Romann <jan.romann@hs-emden-leer.de>
Date: Fri, 6 Dec 2024 09:53:50 +0100
Subject: [PATCH] fix: fix error handling within ThingDiscovery class

---
 lib/src/core/implementation/thing_discovery.dart | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/src/core/implementation/thing_discovery.dart b/lib/src/core/implementation/thing_discovery.dart
index dbf6e780..741a07d8 100644
--- a/lib/src/core/implementation/thing_discovery.dart
+++ b/lib/src/core/implementation/thing_discovery.dart
@@ -485,11 +485,11 @@ class ThingDiscoveryProcess extends Stream<ThingDescription>
   }) {
     final streamSubscription = _thingDescriptionStream.listen(
       onData,
-      onError: (error, stackTrace) {
+      onError: (error) {
         if (error is Exception) {
           _error = error;
           // ignore: avoid_dynamic_calls
-          onError?.call(error, stackTrace);
+          onError?.call(error);
         }
       },
       onDone: () {