Skip to content

Commit

Permalink
fix: Add errors from .subscribe() to .stream() streamController (#…
Browse files Browse the repository at this point in the history
…506)

* fix: add subscription error on stream

* add parameter name to subscription callback

* revert realtime changes
  • Loading branch information
dshukertjr committed Jun 9, 2023
1 parent 044f32c commit a4cb4c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/supabase/lib/src/supabase_stream_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,11 @@ class SupabaseStreamBuilder extends Stream<SupabaseStreamEvent> {
_streamData.removeAt(deletedIndex);
_addStream();
}
}).subscribe();
}).subscribe((status, [error]) {
if (error != null) {
_streamController?.addError(error);
}
});

PostgrestFilterBuilder query = _queryBuilder.select();
if (_streamFilter != null) {
Expand Down

0 comments on commit a4cb4c5

Please sign in to comment.