diff --git a/src/Appwrite/Auth/OAuth2/Slack.php b/src/Appwrite/Auth/OAuth2/Slack.php index a022f31347..6f59e416d8 100644 --- a/src/Appwrite/Auth/OAuth2/Slack.php +++ b/src/Appwrite/Auth/OAuth2/Slack.php @@ -172,6 +172,10 @@ class Slack extends OAuth2 ); $this->user = \json_decode($user, true); + + if (!$this->user['ok']) { + throw new \Exception('Error in fetching user.'); + } } return $this->user;