Skip to content

Commit 775fbf2

Browse files
committed
updated error message
1 parent d792bd7 commit 775fbf2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dwds/lib/src/handlers/dev_handler.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ class DevHandler {
138138
for (final injectedConnection in _injectedConnections) {
139139
try {
140140
injectedConnection.sink.add(jsonEncode(serializers.serialize(request)));
141-
} on StateError catch (_) {
142-
// The sink has already closed (app is disconnected), swallow the
143-
// error.
144-
_logger.warning('Failed to send request to client, connection closed.');
141+
} on StateError catch (e) {
142+
// The sink has already closed (app is disconnected), or another StateError occurred.
143+
_logger.warning(
144+
'Failed to send request to client, connection likely closed. Error: $e',
145+
);
145146
} catch (e, s) {
146147
// Catch any other potential errors during sending.
147148
_logger.severe('Error sending request to client: $e', e, s);

0 commit comments

Comments
 (0)