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

Node server crashes if it can't connect to HMIS server #31

Open
cecilia-donnelly opened this issue Feb 1, 2016 · 1 comment
Open

Node server crashes if it can't connect to HMIS server #31

cecilia-donnelly opened this issue Feb 1, 2016 · 1 comment

Comments

@cecilia-donnelly
Copy link

If the Node JS server (for this client application) fails to connect to the HMIS server named in local.js then it will crash with error:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:8080
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)

This specific error was generated with a local instance of HMIS (localhost:8080), but I've seen this happen with a remote server, too.

We should return an error to the user instead of crashing the client server.

@kfogel
Copy link
Member

kfogel commented Feb 1, 2016

I recall that @slifty mentioned this to me as a known unhandled error, way back when. So it's not unexpected -- demo-only code and all that. Still, we should fix it, now that the client is getting more use.

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