Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean boilerplate 50% error rate #35

Closed
perqa opened this issue Mar 14, 2019 · 2 comments
Closed

Clean boilerplate 50% error rate #35

perqa opened this issue Mar 14, 2019 · 2 comments

Comments

@perqa
Copy link

perqa commented Mar 14, 2019

Just got the boilerplate up-and-running. Clicking refresh results in error message 50% of attempts. I assume this is not intended? What could be wrong?
Screen Shot 2019-03-14 at 16 43 57

MacOS Sierra 10.12.6 (16G1815)
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
Started app by running >react-native run-ios

@AurelGit
Copy link
Collaborator

AurelGit commented Mar 14, 2019

Hello @perqa !

Thanks for your feedback.

In fact, it's absolutely intended ! As you can see on this line :

// Simulate an error 50% of the time just for testing purposes

 // Simulate an error 50% of the time just for testing purposes
  if (Math.random() > 0.5) {
    return new Promise(function(resolve, reject) {
      resolve(null)
    })
  }

It's just to provide a random error to explain how to manage it.
If an error occurs, you can display a different message or something else.

See you on the boilerplate, and don't hesitate to tell us if you have some questions or remarks !

@perqa
Copy link
Author

perqa commented Mar 14, 2019

Haha, sorry about that! :-) Thanks for a quick response, and thanks for sharing the boilerplate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants