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

Crash when mongodb is down #10

Open
cdparra opened this issue Feb 23, 2017 · 0 comments
Open

Crash when mongodb is down #10

cdparra opened this issue Feb 23, 2017 · 0 comments
Labels

Comments

@cdparra
Copy link
Member

cdparra commented Feb 23, 2017

When I run it with node.js, if by any chance the mongodb server is down, the notification service crashes with any requests that come after. If possible, this should be avoided and some error message should be displayed alerting that the problem is simply that mongodb is down.

macondo:appcivist-notification-service cdparra$ node server.js
mongoUri:  mongodb://localhost:27017/notificationservice
registering event routes with express
registering subscription routes with express
registering signal routes with express
registering log routes with express
About to start listening
Listening on port:  3025
/Users/cdparra/Projects/appcivist/appcivist-notification-service/node_modules/mongodb/lib/mongo_client.js:225
          throw err
          ^

TypeError: Cannot read property 'collection' of null
    at /Users/cdparra/Projects/appcivist/appcivist-notification-service/routes/subscriptions.js:50:24
    at connectCallback (/Users/cdparra/Projects/appcivist/appcivist-notification-service/node_modules/mongodb/lib/mongo_client.js:315:5)
    at /Users/cdparra/Projects/appcivist/appcivist-notification-service/node_modules/mongodb/lib/mongo_client.js:222:11
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
@cdparra cdparra added the bug label Feb 23, 2017
@cdparra cdparra modified the milestone: 201709 Sprint 4 Sep 5, 2017
@cdparra cdparra removed this from the 201709 Sprint 4 milestone Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants