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

Actually bail if db not present. Fixes #4. #6

Closed
wants to merge 1 commit into from

Conversation

jaredhirsch
Copy link
Member

@jedp or @seanmonstar, mind having a look?

Hmm. arguably if the DB is gone we should return a 500 every time?

Ah well. This preserves current behavior, minus one bug I found (#4) and another I didn't (when you try to DELETE a user programmatically and the DB is gone, same badness).

res.json/res.send means res is done, but the function continues, does db.foo() where db is null, and, f7u12.

@seanmonstar
Copy link

yea, strange that we'd return a 200 if the db is gone. that sounds like a 500 to me.

@jedp
Copy link
Contributor

jedp commented Jul 9, 2013

I'm with @seanmonstar on returning a 500. Possibly even a res.json(500, {"error":"dude, where's your database?"})

@jaredhirsch
Copy link
Member Author

thanks for the feedback, yall.

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

Successfully merging this pull request may close these issues.

None yet

3 participants