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
| 16 | |
| 17 | |
| 18 | class 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 | |
| 36 | class SlackTokenRotationError(SlackClientError): |
no outgoing calls
no test coverage detected