Skip to content

st2chatops exits because command doesn't match format string #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jinpingh opened this issue Jun 28, 2019 · 1 comment · Fixed by #183
Closed

st2chatops exits because command doesn't match format string #182

jinpingh opened this issue Jun 28, 2019 · 1 comment · Fixed by #183

Comments

@jinpingh
Copy link
Contributor

Version: st2 3.1.0, on Python 3.6.8

Duplicate:
With default action alias !pack get <pack>. If run !pack get pack=example, the st2chatops exits with exception.

[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] ERROR Failed to create an alias execution: { name: 'APIError',
 status: 400,
 message:
  'Command "pack get pack=core" doesn\'t match format string "pack get {{ pack }}"' }
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] DEBUG SlackClient#send() room: GJJCKM0HF, message: [object Object]
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] ERROR undefined
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] ERROR {"name":"APIError","status":400,"message":"Command \"pack get pack=core\" doesn't match format string \"pack get {{ pack }}\""}
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] INFO Hubot will shut down ...
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] INFO Disconnected from Slack RTM
[Fri Jun 28 2019 21:50:39 GMT+0000 (Coordinated Universal Time)] INFO Exiting...
@jinpingh jinpingh added the bug label Jun 28, 2019
@arm4b
Copy link
Member

arm4b commented Jun 28, 2019

Comes from

robot.logger.error('Failed to create an alias execution:', err);
var addressee = formatter.normalizeAddressee(msg);
var message = util.format(_.sample(ERROR_MESSAGES), err.message);
if (err.requestId) {
message = util.format(
message,
util.format('; Use request ID %s to grep st2 api logs.', err.requestId));
}
postDataHandler.postData({
whisper: false,
user: addressee.name,
channel: addressee.room,
message: message,
extra: {
color: '#F35A00'
}
});
throw err;

It could be #172 when previous chatops version considered that throw as non-critical and recovered/self-healed by looping further as nothing happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants