- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/bitrix24disk/legacy/storagecontroller.php
- Класс: BitrixDiskBitrix24DiskLegacyStorageController
- Вызов: StorageController::sendJsonResponse
protected function sendJsonResponse($response, $params = null)
{
if(!$this->ignoreQuotaError() && $this->isQuotaError())
{
parent::sendJsonResponse(array(
'status' => static::STATUS_NO_SPACE,
));
}
$detail = array();
$errors = $this->getErrors();
if($this->storage)
{
$errors = array_merge($errors, $this->storage->getErrors());
}
$this->appendLastErrorToErrorCollection();
//may be duplicate rows
foreach($errors as $error)
{
/** @var Error $error */
$detail[] = array(
'message' => str_replace('\', '/', $error->getMessage()),
'code' => $error->getCode(),
);
}
if($detail)
{
$response['detail'] = $detail;
}
header("X-Bitrix-Disk-API: " . self::VERSION);
parent::sendJsonResponse($response, $params);
}