Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
oauthexception.php
1<?
2namespace Bitrix\Rest;
3
5 extends RestException
6{
7 protected $result;
8
14 public function __construct($oauthResult, \Exception $previous = null)
15 {
16 $this->result = $oauthResult;
17
18 parent::__construct(
19 $this->result['error_description'] ?? '',
20 static::ERROR_OAUTH,
21 isset($oauthResult["error_status"])
22 ? $oauthResult["error_status"]
23 : \CRestServer::STATUS_UNAUTHORIZED,
24 $previous
25 );
26
27 if(isset($oauthResult['additional']) && is_array($oauthResult['additional']))
28 {
29 $this->setAdditional($oauthResult['additional']);
30 }
31 }
32
33 public function getErrorCode()
34 {
35 return $this->result['error'];
36 }
37}
38?>
__construct($oauthResult, \Exception $previous=null)
setAdditional($error_additional)