-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fail if Slack API response is not OK with error message #9198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Felix Fontein <[email protected]>
…-with-error-message.yml Co-authored-by: Felix Fontein <[email protected]>
I'll merge this on the weekend if nobody objects, and assuming that CI passes. Right now there seems to be an AZP problem, I'll try to restart CI tomorrow, hopefully AZP fixed the problem by then :) |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
f2dbe08
into
ansible-collections:main
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #9211 🤖 @patchback |
* Fails if slack api return is not ok * add changelog * show all error * add doc * Update plugins/modules/slack.py Co-authored-by: Felix Fontein <[email protected]> * Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f2dbe08)
Backport to stable-10: 💚 backport PR created✅ Backport PR branch: Backported as #9212 🤖 @patchback |
* Fails if slack api return is not ok * add changelog * show all error * add doc * Update plugins/modules/slack.py Co-authored-by: Felix Fontein <[email protected]> * Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f2dbe08)
@Aohzan thanks for your contribution! |
…not OK with error message (#9211) Fail if Slack API response is not OK with error message (#9198) * Fails if slack api return is not ok * add changelog * show all error * add doc * Update plugins/modules/slack.py Co-authored-by: Felix Fontein <[email protected]> * Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f2dbe08) Co-authored-by: Matthieu Bourgain <[email protected]>
… not OK with error message (#9212) Fail if Slack API response is not OK with error message (#9198) * Fails if slack api return is not ok * add changelog * show all error * add doc * Update plugins/modules/slack.py Co-authored-by: Felix Fontein <[email protected]> * Update changelogs/fragments/9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f2dbe08) Co-authored-by: Matthieu Bourgain <[email protected]>
SUMMARY
Currently, when I try to edit a slack message, the module call the
get_slack_message
function and fails onif len(data['messages']) < 1:
becausemessages
is not return by Slack API.So this PR return to ansible the result of the request to show the real error to the user.
ISSUE TYPE
COMPONENT NAME
community.general.slack
ADDITIONAL INFORMATION
become