Add warning if HTTP In node is missing path config

This commit is contained in:
Nick O'Leary 2015-09-24 10:06:25 +01:00
parent d96b6e77c0
commit 66ec9bae27
2 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,10 @@ module.exports = function(RED) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
if (RED.settings.httpNodeRoot !== false) { if (RED.settings.httpNodeRoot !== false) {
if (!n.url) {
this.warn(RED._("httpin.errors.missing-path"));
return;
}
this.url = n.url; this.url = n.url;
this.method = n.method; this.method = n.method;
this.swaggerDoc = n.swaggerDoc; this.swaggerDoc = n.swaggerDoc;

View File

@ -269,6 +269,7 @@
"httpreq": "http request", "httpreq": "http request",
"errors": { "errors": {
"not-created": "Cannot create http-in node when httpNodeRoot set to false", "not-created": "Cannot create http-in node when httpNodeRoot set to false",
"missing-path": "missing path",
"no-response": "No response object", "no-response": "No response object",
"json-error": "JSON parse error", "json-error": "JSON parse error",
"no-url": "No url specified" "no-url": "No url specified"