Yoji SHIDARA
null+****@clear*****
Thu Oct 18 14:48:34 JST 2012
Yoji SHIDARA 2012-10-18 14:48:34 +0900 (Thu, 18 Oct 2012) New Revision: 70597742555d38ef8e499dbcd8b39614a89ceba5 https://github.com/groonga/gcs-console/commit/70597742555d38ef8e499dbcd8b39614a89ceba5 Log: Show error.Message if exists Modified files: routes/index.js Modified: routes/index.js (+6 -0) =================================================================== --- routes/index.js 2012-10-18 14:30:38 +0900 (8a2223b) +++ routes/index.js 2012-10-18 14:48:34 +0900 (d5e1790) @@ -144,6 +144,12 @@ exports.domainCreatePost = function(req, res) { DomainName: domainName }, function(error, data) { if (error) { + if (error.Message) { + res.status(500); + res.render('error', {message: error.Message}); + return; + } + // TODO redirect back domainCreate if it is a kind of validation error // TODO render error in a more pretty way // TODO in some cases, the error should be 400 rather than 500 -------------- next part -------------- HTML����������������������������... Download