mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix error handling in runtime/lib/api/nodes
This commit is contained in:
parent
2bbdc85a29
commit
d7dc7c4eda
@ -272,7 +272,7 @@ var api = module.exports = {
|
||||
} catch(error) {
|
||||
runtime.log.audit({event: "nodes.remove",module:opts.module,error:error.code||"unexpected_error",message:error.toString()}, opts.req);
|
||||
error.status = 400;
|
||||
throw err;
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
@ -319,7 +319,7 @@ var api = module.exports = {
|
||||
} catch(error) {
|
||||
runtime.log.audit({event: "nodes.module.set",module:mod,enabled:opts.enabled,error:error.code||"unexpected_error",message:error.toString()}, opts.req);
|
||||
error.status = 400;
|
||||
throw err;
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
@ -366,7 +366,7 @@ var api = module.exports = {
|
||||
} catch(error) {
|
||||
runtime.log.audit({event: "nodes.info.set",id:id,enabled:enabled,error:error.code||"unexpected_error",message:error.toString()}, opts.req);
|
||||
error.status = 400;
|
||||
throw err;
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user