• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/restservice.php
  • Класс: BitrixImBotRestService
  • Вызов: RestService::throwException
static function throwException(Error $error): void
{
	$status =
		$error->code === AccessException::CODE
		? CRestServer::STATUS_FORBIDDEN
		: CRestServer::STATUS_WRONG_REQUEST;

	throw new RestException($error->msg, $error->code, $status);
}