chore: added error handling to user

This commit is contained in:
Chirag Aggarwal 2025-01-17 07:14:48 +00:00
parent 5d3071e084
commit 983eee9266

View file

@ -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;