-
Notifications
You must be signed in to change notification settings - Fork 28
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
Better error in case of no connection #37
Comments
When does the error pop up? It looks like it's a Also do you expect to throw a descriptive message or what? |
Well, in this case, node-at uses it as a dependency or something, and in order to use node-at, you cd to it's directory, run |
The topic needs some digging to be done. A quick way to do this is to add following statement before the line where error occurs. if (resp === undefined) {
cb(new Error('Message'))
} There may be an option to simply prepend the failing condition with Also, the error does not mean that the connection is lost. To be sure why the Try updating the dependencies. The error stack points to line 23 where I couldn't find the source of the problem. You're using an older version of yggdrasil (and mineflayer) Updating the dependencies may fix this error. If updating dependencies won't work and you can find the source of the problem, I encourage you to create a PR |
Oh gosh. This isn't my project, it belongs to @builder-247. Perhaps I'm looking at this wrong, but it says that |
|
I did. However, it is not a problem with the project, rather with yggdrasil. Still, I will see about getting him to update yggdrasil. |
I don't understand at all what this issue is about. Does that solve the issue ? |
Not neccessarily that, but I was thinking, it'd be better to use a try-catch and then throw a more descriptive custom error message, such as "Internet Connection Interrupted" |
I'll copy from an issue I mistakenly made on a project that uses yggdrasil.
It seems, that when the internet connection is shut off, that the
response
becomes null, however, since this was never expected, there are no checks for this, therefore it attempts to retrieve data it cannot get.The text was updated successfully, but these errors were encountered: