MCPcopy Create free account
hub / github.com/slackapi/python-slack-sdk / SlackApiError

Class SlackApiError

slack_sdk/errors/__init__.py:18–33  ·  view source on GitHub ↗

Error raised when Slack does not send the expected response. Attributes: response (SlackResponse): The SlackResponse object containing all of the data sent back from the API. Note: The message (str) passed into the exception is used when a user converts the exceptio

Source from the content-addressed store, hash-verified

16
17
18class SlackApiError(SlackClientError):
19 """Error raised when Slack does not send the expected response.
20
21 Attributes:
22 response (SlackResponse): The SlackResponse object containing all of the data sent back from the API.
23
24 Note:
25 The message (str) passed into the exception is used when
26 a user converts the exception to a str.
27 i.e. str(SlackApiError("This text will be sent as a string."))
28 """
29
30 def __init__(self, message, response):
31 msg = f"{message}\nThe server responded with: {response}"
32 self.response = response
33 super(SlackApiError, self).__init__(msg)
34
35
36class SlackTokenRotationError(SlackClientError):

Callers 4

_request_with_sessionFunction · 0.90
_perform_http_requestMethod · 0.90
_perform_http_requestMethod · 0.90
_request_with_sessionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected