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

need cleaner handling when required env var missing #26

Open
barnabyc opened this issue Sep 13, 2011 · 0 comments
Open

need cleaner handling when required env var missing #26

barnabyc opened this issue Sep 13, 2011 · 0 comments

Comments

@barnabyc
Copy link
Member

Currently we don't do any sanity checks for the env vars we're looking for, instead we crash, like this:

barnaby:drip 22:18:02 (502) $ nodemon script/init.js
12 Sep 22:18:08 - [nodemon] v0.5.5
12 Sep 22:18:08 - [nodemon] watching: /Users/barnaby/Source/nko2/drip
12 Sep 22:18:08 - [nodemon] running init.js
12 Sep 22:18:08 - [nodemon] starting node

node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^

TypeError: Cannot read property 'length' of undefined
at Object.urlParse as parse
at Object. (/Users/barnaby/Source/nko2/drip/config/credentials.js:8:19)
at Object. (/Users/barnaby/Source/nko2/drip/config/credentials.js:19:4)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at require (module.js:346:19)
at Object. (/Users/barnaby/Source/nko2/drip/config/app.js:15:17)
at Object. (/Users/barnaby/Source/nko2/drip/config/app.js:30:4)

12 Sep 22:18:08 - [nodemon] app crashed - waiting for file change before starting...

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

1 participant