mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 09:17:55 +08:00
Added clarifying language to error for not finding development server
Summary: Added additional check to make if seeing error message on not finding development server: Node server URL is correctly set in AppDelegate. Should make it easier for a developer that is not running on localhost for the first time. Screenshot of updated error message:  Closes https://github.com/facebook/react-native/pull/2484 Github Author: futbalguy <kyle.rokita@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
// Handle general request errors
|
||||
if (error) {
|
||||
if ([error.domain isEqualToString:NSURLErrorDomain]) {
|
||||
NSString *desc = [@"Could not connect to development server. Ensure node server is running and available on the same network - run 'npm start' from react-native root\n\nURL: " stringByAppendingString:scriptURL.absoluteString];
|
||||
NSString *desc = [@"Could not connect to development server.\n\nEnsure the following:\n- Node server is running and available on the same network - run 'npm start' from react-native root\n- Node server URL is correctly set in AppDelegate\n\nURL: " stringByAppendingString:scriptURL.absoluteString];
|
||||
NSDictionary *userInfo = @{
|
||||
NSLocalizedDescriptionKey: desc,
|
||||
NSLocalizedFailureReasonErrorKey: error.localizedDescription,
|
||||
|
||||
Reference in New Issue
Block a user