mirror of
https://github.com/status-im/react-native.git
synced 2025-01-26 09:19:10 +00:00
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:
parent
bfbc280fb4
commit
4b5b952c32
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user