• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/onedrivehandler.php
  • Класс: BitrixDiskDocumentOneDriveHandler
  • Вызов: OneDriveHandler::checkHttpResponse
public function checkHttpResponse(HttpClient $http)
{
	$status = (int)$http->getStatus();

	if($status === 403 && mb_strpos($http->getHeaders()->get('content-type'), 'application/json') !== false)
	{
		$result = Json::decode($http->getResult());
		if(!empty($result['error']['code']) && $result['error']['code'] === 'accessDenied')
		{
			$this->errorCollection[] = new Error(
				'Insufficient scope (403)',
				self::ERROR_CODE_INSUFFICIENT_SCOPE
			);

			return false;
		}
	}

	return parent::checkHttpResponse($http);
}