mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Standardise API error response format
This commit is contained in:
@@ -31,9 +31,8 @@ var needsPermission = auth.needsPermission;
|
||||
var settings = require("../settings");
|
||||
|
||||
var errorHandler = function(err,req,res,next) {
|
||||
//TODO: standardize json response
|
||||
console.log(err.stack);
|
||||
res.send(400,err.toString());
|
||||
res.json(400,{message:err.toString()});
|
||||
};
|
||||
|
||||
function init(adminApp,storage) {
|
||||
|
||||
Reference in New Issue
Block a user