From 4b5b952c32d4d85bd593d3c2374b51feea8c9523 Mon Sep 17 00:00:00 2001 From: "philipp.krone" Date: Wed, 8 Jul 2015 09:33:49 -0700 Subject: [PATCH] Changing Error to Warning Summary: As discussed with @nicklockwood in the issue https://github.com/facebook/react-native/issues/1780, the error should be changed to a warning to not break fetch() to send a POST to a remote API without wanting to parse the reply. E.g. google sends back an empty 1x1px gif when POSTing something to google analytics. Closes https://github.com/facebook/react-native/pull/1860 Github Author: "philipp.krone" --- Libraries/Network/RCTNetworking.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Network/RCTNetworking.m b/Libraries/Network/RCTNetworking.m index e6785c5ad..b6fb100d7 100644 --- a/Libraries/Network/RCTNetworking.m +++ b/Libraries/Network/RCTNetworking.m @@ -381,7 +381,7 @@ RCT_EXPORT_MODULE() NSString *responseText = [[NSString alloc] initWithData:data encoding:encoding]; if (!responseText && data.length) { - RCTLogError(@"Received data was invalid."); + RCTLogWarn(@"Received data was invalid."); return; }