Skip to content

Commit

Permalink
Добавили детали ошибки при публикации дубликатов вакансии
Browse files Browse the repository at this point in the history
  • Loading branch information
Diacrome authored and iriss22 committed Sep 21, 2020
1 parent 549bad2 commit fff5897
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
33 changes: 32 additions & 1 deletion docs/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ HTTP code | type | value | reason | описание
400 | bad_json_data | *field_name* | *reason* | ошибка в поле вакансии, где *field_name* – ключ поля верхнего уровня, поле reason может не присутствовать
403 | vacancies | not_enough_purchased_services | | купленных услуг для публикации или обновления данного типа вакансии не достаточно
403 | vacancies | quota_exceeded | | квота менеджера на публикацию данного типа вакансии закончилась
403 | vacancies | duplicate | | аналогичная вакансия уже опубликована, данную ошибку можно форсировано отключить (при [добавлении](employer_vacancies.md#creation-ignore-duplicates) и [редактировании](employer_vacancies.md#edit-ignore-duplicates))
403 | vacancies | duplicate | | аналогичная вакансия уже опубликована. В [ответе](#vacancies-duplicate-response) передается информация по дубликатам вакансии. Данную ошибку можно форсировано отключить (при [добавлении](employer_vacancies.md#creation-ignore-duplicates) и [редактировании](employer_vacancies.md#edit-ignore-duplicates))
403 | vacancies | creation_forbidden | | публикация вакансий недоступна текущему менеджеру
403 | vacancies | unavailable_for_archived | | редактирование недоступно для архивной вакансии
403 | vacancies | conflict_changes | | конфликтные изменения данных вакансии ([подробнее](employer_vacancies.md#edit_more))
Expand Down Expand Up @@ -347,6 +347,37 @@ default_vacancy_branded_template_is_invalid_or_not_enough_purchased_services |
department_code_prohibited_in_anonymous_vacancy | нельзя указать код подразделения для анонимной вакансии
branded_template_prohibited_in_anonymous_vacancy | использование брендированного шаблона невозможно для анонимной вакансии

<a name="vacancies-duplicate-response"></a>
#### Пример ответа при ошибке duplicate

```json
{
"errors": [
{
"type": "vacancies",
"value": "duplicate",
"found": 2,
"items": [
{
"id": 1337
},
{
"id": 78789890
}
]
}
]
}
```

### Поля ответа:

Имя | Тип | Описание
--- | --- | --------
found | number | Общее количество дубликатов вакансии
items | array | Ограниченное количество записей с информацией о дубликатах. Не гарантирует выдачу всех дубликатов.
items[].id | number | Идентификатор вакансии

<a name="vacancies-prolongate"></a>
### Продление вакансии

Expand Down
33 changes: 32 additions & 1 deletion docs_eng/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ HTTP code| type| value| description
400 | vacancies | *field_name* | the is an error in a job's field, where the *field_name* is the key of the upper level field and the reason field may be missing
403 | vacancies | not_enough_purchased_services | the purchased services are not enough to publish or update this type of job
403 | vacancies | quota_exceeded | the manager's quota for the publication of this type of job is exhausted
403 | vacancies | duplicate | a similar job has already been published; this error can be disabled by force (when [adding](employer_vacancies.md#creation-ignore-duplicates) or [editing](employer_vacancies.md#edit-ignore-duplicates))
403 | vacancies | duplicate | a similar job has already been published; the [response](#vacancy-duplicate-response) contains information about duplicate jobs; this error can be disabled by force (when [adding](employer_vacancies.md#creation-ignore-duplicates) or [editing](employer_vacancies.md#edit-ignore-duplicates))
403 | vacancies | creation_forbidden | jobs cannot be published by the current manager
403 | vacancies | unavailable_for_archived | you cannot edit an archived job
403 | vacancies | conflict_changes | a conflict was detected between changes to the job's data ([read more](employer_vacancies.md#edit_more))
Expand Down Expand Up @@ -318,6 +318,37 @@ default_vacancy_branded_template_is_invalid_or_not_enough_purchased_services | b
department_code_prohibited_in_anonymous_vacancy | you cannot specify a department code for an anonymous vacancy
branded_template_prohibited_in_anonymous_vacancy | you cannot use a branded template for an anonymous vacancy

<a name="vacancies-duplicate-response"></a>
#### Example response on error duplicate

```json
{
"errors": [
{
"type": "vacancies",
"value": "duplicate",
"found": 2,
"items": [
{
"id": 1337
},
{
"id": 78789890
}
]
}
]
}
```

### Response fields

Path | JSON type | Description
--- | --- | --------
found | number | total number of duplicate jobs
items | array | limited number of records with information about duplicates. Does not guarantee all duplicates will be returned.
items[].id | number | job id

<a name="vacancies-prolongate"></a>
### Vacancy extension

Expand Down

0 comments on commit fff5897

Please sign in to comment.