diff --git a/packages/node_modules/@node-red/editor-api/lib/util.js b/packages/node_modules/@node-red/editor-api/lib/util.js index 73c222e5c..8c6ad1d99 100644 --- a/packages/node_modules/@node-red/editor-api/lib/util.js +++ b/packages/node_modules/@node-red/editor-api/lib/util.js @@ -21,6 +21,8 @@ var i18n = require("@node-red/util").i18n; // TODO: separate module module.exports = { errorHandler: function(err,req,res,next) { + //TODO: why this when rejectHandler also?! + if (err.message === "request entity too large") { log.error(err); } else { @@ -39,6 +41,8 @@ module.exports = { return lang; }, rejectHandler: function(req,res,err) { + //TODO: why this when errorHandler also?! + log.audit({event: "api.error",error:err.code||"unexpected_error",message:err.message||err.toString()},req); res.status(err.status||500).json({ code: err.code||"unexpected_error", message: err.message||err.toString()