Skip to content

Commit 4b5b952

Browse files
committed
Changing Error to Warning
Summary: As discussed with @nicklockwood in the issue #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 #1860 Github Author: "philipp.krone" <[email protected]>
1 parent bfbc280 commit 4b5b952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Network/RCTNetworking.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ - (void)sendData:(NSData *)data forRequestToken:(id)requestToken
381381

382382
NSString *responseText = [[NSString alloc] initWithData:data encoding:encoding];
383383
if (!responseText && data.length) {
384-
RCTLogError(@"Received data was invalid.");
384+
RCTLogWarn(@"Received data was invalid.");
385385
return;
386386
}
387387

0 commit comments

Comments
 (0)