"500 Server Error" if the text piped to slackcmd.py is an empty string
shun-liang opened this issue · 0 comments
shun-liang commented
A "500 Server Error" will be thrown if the text piped to slackcmd.py is an empty string:
$ ls not-existing-path | python /data/Install/slackcmd/slackcmd/slackcmd.py -u https://hooks.slack.com/services/******** -c "#clusterjobs" ls: cannot access not-existing-path: No such file or directory Response: 500 - Server Error
$ echo -n "" | python /data/Install/slackcmd/slackcmd/slackcmd.py -u https://hooks.slack.com/services/******* -c "#clusterjobs" Response: 500 - Server Error
Looks like Slack webhook does not like empty text string in the JSON payload.