Метод fieldRefusalOf
Сигнатура метода
private static function fieldRefusalOf(Error $error): Error
Возвращает:
Error
Описание
A refusal of the domain as the transport publishes it: the `field` of an element of the answer is the name of the field, taken from the custom data of the error. The slot is the platform's own and the platform fills it with a name of a field for the refusals of its own - a code of the domain standing there would name a field of the form the client has not. The code itself has nowhere else to go: an element carries a message and a field and nothing more, and the transport reads the custom data of an error nowhere. A refusal about no field at all - a failure of the storage boundary above all - names none rather than naming something: an element whose code is empty is published without the `field`, and that is what "not about a field of the request" looks like in this answer. So a client is left with the `code` of the answer and the `field` of an element to tell one refusal from another, and that is said to the client itself rather than only here - {@see REFUSAL_DESCRIPTION} goes into the published description of every method of the group. The message is moved over as it came and not as a text: the domain leaves its phrase unresolved so that the language of the answer can pick the wording, and reading it out here would settle the wording in the language of the portal for every client ({@see \Bitrix\Crm\V2\Internal\Entity\Dictionary\DictionaryError::toError()}).
Параметры
1| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$error
|
Error
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulescrm/lib/V2/Infrastructure/Rest/CustomController/Dictionary/DictionaryValue.php