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" <kronep@googlemail.com>
This commit is contained in:
philipp.krone 2015-07-08 09:33:49 -07:00
parent bfbc280fb4
commit 4b5b952c32

View File

@ -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;
}