mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
chore: added error handling to user
This commit is contained in:
parent
5d3071e084
commit
983eee9266
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue