slack.exceptions - Exceptions

exception slack.exceptions.FailedVerification(token: str, team_id: str)[source]

Bases: slack.exceptions.InvalidRequest

Raised when incoming data from Slack webhooks fail verification

token

Token that failed verification

team_id

Team id that failed verification

exception slack.exceptions.HTTPException(status: int, headers: MutableMapping[KT, VT], data: MutableMapping[KT, VT])[source]

Bases: Exception

Raised on non 200 status code

headers

Response headers

data

Response data

status

Response status

exception slack.exceptions.InvalidRequest[source]

Bases: Exception

Base class for all exception raised due to an invalid verification

exception slack.exceptions.InvalidSlackSignature(slack_signature: str, calculated_signature: str)[source]

Bases: slack.exceptions.InvalidRequest

Raised when the incoming request fails signature check

slack_signature

Signature sent by slack

calculated_singature

Calculated signature

exception slack.exceptions.InvalidTimestamp(timestamp: float)[source]

Bases: slack.exceptions.InvalidRequest

Raised when the incoming request is too old

timestamp

Timestamp of the incoming request

exception slack.exceptions.RateLimited(retry_after: int, error: str, status: int, headers: MutableMapping[KT, VT], data: MutableMapping[KT, VT])[source]

Bases: slack.exceptions.HTTPException, slack.exceptions.SlackAPIError

Raised when rate limited.

retry_after

Timestamp when the rate limitation ends

exception slack.exceptions.SlackAPIError(error: str, headers: MutableMapping[KT, VT], data: MutableMapping[KT, VT])[source]

Bases: Exception

Raised for errors return by the Slack API

headers

Response headers

data

Response data

error

Slack API error