We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Slack needs to have the retry decorator added to it to prevent workers from failing even though they are successful.
The text was updated successfully, but these errors were encountered:
Sample stacktrace:
Traceback (most recent call last): File "/var/task/starfleet/worker_ships/plugins/aws_config/ship.py", line 94, in lambda_handler worker.execute(commit=commit) File "/var/task/starfleet/worker_ships/plugins/aws_config/ship.py", line 55, in execute self.send_alert( File "/var/task/starfleet/worker_ships/ship_schematics.py", line 187, in send_alert SLACK_CLIENT.post_success(self.alert_channel, title, body_markdown) File "/var/task/starfleet/utils/slack.py", line 108, in post_success if not self._post_message(channel_id, message): File "/var/task/starfleet/utils/slack.py", line 62, in _post_message result = self._web_client.chat_postMessage(channel=channel_id, blocks=blocks, text=blocks[0]["text"]["text"]) File "/var/task/slack_sdk/web/client.py", line 2220, in chat_postMessage return self.api_call("chat.postMessage", json=kwargs) File "/var/task/slack_sdk/web/base_client.py", line 156, in api_call return self._sync_send(api_url=api_url, req_args=req_args) File "/var/task/slack_sdk/web/base_client.py", line 187, in _sync_send return self._urllib_api_call( File "/var/task/slack_sdk/web/base_client.py", line 317, in _urllib_api_call ).validate() File "/var/task/slack_sdk/web/slack_response.py", line 199, in validate raise e.SlackApiError(message=msg, response=self) slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: https://www.slack.com/api/chat.postMessage) The server responded with: {'ok': False, 'error': 'ratelimited'}
Sorry, something went wrong.
In addition to this, Slack also needs to have a try...except in the _post_message function. Upon a caught exception, it should return False.
try...except
_post_message
False
Addressed the exception handling in #62. I would like to also detect if a message is bigger than 3001 characters and alert a note that it was too big.
mikegrima
No branches or pull requests
Slack needs to have the retry decorator added to it to prevent workers from failing even though they are successful.
The text was updated successfully, but these errors were encountered: