MCPcopy Index your code
hub / github.com/slackapi/python-slack-sdk / validate

Method validate

slack/web/async_slack_response.py:174–187  ·  view source on GitHub ↗

Check if the response from Slack was successful. Returns: (AsyncSlackResponse) This method returns it's own object. e.g. 'self' Raises: SlackApiError: The request to the Slack API failed.

(self)

Source from the content-addressed store, hash-verified

172 return self.data.get(key, default)
173
174 def validate(self):
175 """Check if the response from Slack was successful.
176
177 Returns:
178 (AsyncSlackResponse)
179 This method returns it's own object. e.g. 'self'
180
181 Raises:
182 SlackApiError: The request to the Slack API failed.
183 """
184 if self.status_code == 200 and self.data and self.data.get("ok", False):
185 return self
186 msg = "The request to the Slack API failed."
187 raise e.SlackApiError(message=msg, response=self)

Callers 4

__anext__Method · 0.95
_sendMethod · 0.45
_urllib_api_callMethod · 0.45
_sendMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected