summaryrefslogtreecommitdiffstats
path: root/deployment-handler.js
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-05-04 12:26:17 -0400
committerAlex Shatov <alexs@att.com>2018-05-04 12:26:17 -0400
commita46339420faefc49cb48adf2989a0884ff961278 (patch)
tree3862914b2996f355982085784bdea3f77ba0fd85 /deployment-handler.js
parentf8cab3eebdcee288332e16bda5bd6b2fa17e02ac (diff)
fixed 500 "value" argument is out of bounds
- convert the EOL to linux "\n" in the blueprint before zipping and sending to cloudify to avoid crashing when the blueprint is windows "\r\n" or mac "\r" based - on catching the exception - log the stack - added logger.info that replaced the logger.debug in a variety of places - external version 2.1.2, internal version 4.4.2 - unit test code coverage Statements : 84.26% ( 942/1118 ) Branches : 64.14% ( 322/502 ) Functions : 81.68% ( 156/191 ) Lines : 84.32% ( 930/1103 ) Change-Id: I9f5f28ddd5d143ca4903316c9199df7d27682143 Signed-off-by: Alex Shatov <alexs@att.com> Issue-ID: DCAEGEN2-487
Diffstat (limited to 'deployment-handler.js')
-rw-r--r--deployment-handler.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/deployment-handler.js b/deployment-handler.js
index e049b82..bc1a85a 100644
--- a/deployment-handler.js
+++ b/deployment-handler.js
@@ -77,7 +77,7 @@ const start = function(config) {
};
process.mainModule.exports.config = config;
- log.debug(null, "Configuration: " + JSON.stringify(config));
+ log.info(null, "Configuration: " + JSON.stringify(config));
set_app();
@@ -103,7 +103,7 @@ const start = function(config) {
}
catch (e) {
throw (createError('Could not create http(s) server--exiting: '
- + e.message, 500, 'system', 551));
+ + (e.message || "") + " " + (e.stack || "").replace(/\n/g, " "), 500, 'system', 551));
}
server.setTimeout(0);
@@ -147,10 +147,10 @@ const log = logging.getLogger();
conf.configure()
.then(start)
.catch(function(e) {
- log.error(e.logCode ? e : createError(
- 'Deployment-handler exiting due to start-up problem: ' + e.message, 500,
- 'system', 552));
- console.error("Deployment-handler exiting due to startup problem: " + e.message);
+ const fatal_msg = 'Deployment-handler exiting due to start-up problem: ' + (e.message || "")
+ + " " + (e.stack || "").replace(/\n/g, " ");
+ log.error(e.logCode ? e : createError(fatal_msg, 500, 'system', 552));
+ console.error(fatal_msg);
});
module.exports.app = app;