Add error codes to api responses

This commit is contained in:
Nick O'Leary
2015-03-31 22:29:15 +01:00
parent 31b018c80e
commit fbfc5c8a2d
5 changed files with 19 additions and 19 deletions

View File

@@ -32,7 +32,7 @@ var settings = require("../settings");
var errorHandler = function(err,req,res,next) {
console.log(err.stack);
res.json(400,{message:err.toString()});
res.json(400,{error:"unexpected_error", message:err.toString()});
};
function init(adminApp,storage) {