File tree Expand file tree Collapse file tree 2 files changed +22
-16
lines changed
packages/react-native/src/sync/stream Expand file tree Collapse file tree 2 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @powersync/react-native ' : patch
3+ ---
4+
5+ fixed Flipper warning still showing if an HTTP request rejected due to an error.
Original file line number Diff line number Diff line change @@ -63,23 +63,24 @@ export class ReactNativeRemote extends AbstractRemote {
6363 } , STREAMING_POST_TIMEOUT_MS )
6464 : null ;
6565
66- const result = await super . postStream ( {
67- ...options ,
68- fetchOptions : {
69- ...options . fetchOptions ,
70- /**
71- * The `react-native-fetch-api` polyfill provides streaming support via
72- * this non-standard flag
73- * https://github.com/react-native-community/fetch#enable-text-streaming
74- */
75- // @ts -expect-error https://github.com/react-native-community/fetch#enable-text-streaming
76- reactNative : { textStreaming : true }
66+ try {
67+ return await super . postStream ( {
68+ ...options ,
69+ fetchOptions : {
70+ ...options . fetchOptions ,
71+ /**
72+ * The `react-native-fetch-api` polyfill provides streaming support via
73+ * this non-standard flag
74+ * https://github.com/react-native-community/fetch#enable-text-streaming
75+ */
76+ // @ts -expect-error https://github.com/react-native-community/fetch#enable-text-streaming
77+ reactNative : { textStreaming : true }
78+ }
79+ } ) ;
80+ } finally {
81+ if ( timeout ) {
82+ clearTimeout ( timeout ) ;
7783 }
78- } ) ;
79-
80- if ( timeout ) {
81- clearTimeout ( timeout ) ;
8284 }
83- return result ;
8485 }
8586}
You can’t perform that action at this time.
0 commit comments