krakenjs / kraken-devtools

Development-time tools for kraken.js applications.
Other
40 stars 32 forks source link

Asking for precompiled DUST template that doesn't exist crashes the process #28

Closed vaughan99 closed 9 years ago

vaughan99 commented 10 years ago

I have a bug in my single page app that yielded a request for a template that doesn't exist. Rather than returning 404, the devtools middleware crashes when trying to compile the non-existent template.

REQUEST: https://localhost.paypal.com:7443/developer/templates/US/fr/partials/page/foo.js

CONSOLE: GET /developer/templates/US/fr/partials/page/foo.properties 404 244.000 ms - 1077954 Wed, 24 Sep 2014 15:19:37 GMT uncaughtException ENOENT, open '/Users/cvaughan/workspace/git/cvaughan/developernodeweb/public/templates/partials/page/foo.dust' Error: ENOENT, open '/Users/cvaughan/workspace/git/cvaughan/developernodeweb/public/templates/partials/page/foo.dust'

-Chris Vaughan

vaughan99 commented 10 years ago

Actually, not sure if 404 is the proper response from the devtools middleware, but crashing the process is definitely not the proper response :)

aredridel commented 10 years ago

Not sure what the right answer is if it's not to 404!

Crashing is right out though!

pvenkatakrishnan commented 9 years ago

https://github.com/krakenjs/kraken-devtools/pull/29 this will throw an error causing 404.

pvenkatakrishnan commented 9 years ago

closing this as #29 is merged