1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

improve rejection message

This commit is contained in:
Steve-Mcl 2022-04-06 15:11:03 +01:00
parent 5633c5224e
commit ccb3c991a6

View File

@ -13,7 +13,7 @@ module.exports = {
scope: diagnosticsOpts.level || "basic"
}
if(diagnosticsOpts.enabled === false || diagnosticsOpts.enabled === "false") {
apiUtil.rejectHandler(req, res, {message: "disabled", status: 403, code: "diagnostics.enabled" })
apiUtil.rejectHandler(req, res, {message: "diagnostics are disabled", status: 403, code: "diagnostics.disabled" })
} else {
runtimeAPI.diagnostics.get(opts)
.then(function(result) { res.json(result); })