We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
err.stack
1 parent 5c86bfa commit 6165f1eCopy full SHA for 6165f1e
scripts/stackstorm.js
@@ -133,7 +133,7 @@ module.exports = function(robot) {
133
}
134
135
function logErrorAndExit(err, res) {
136
- if (err) {
+ if (err && err.stack) {
137
robot.logger.error(err.stack);
138
139
if (res) {
@@ -251,7 +251,7 @@ module.exports = function(robot) {
251
.catch(function (err) {
252
var error_msg = 'Failed to retrieve commands from "%s": %s';
253
robot.logger.error(util.format(error_msg, env.ST2_API_URL, err.message));
254
- if (err.status === 401 && err.message.includes("Unauthorized")) {
+ if (err.status === 401 || err.message.includes("Unauthorized")) {
255
logErrorAndExit(err);
256
257
});
0 commit comments