Error codes
The codes that REGES Gateway adds to the shared ones, grouped by HTTP status, with what each means and what to do.
On this page
A refused request answers with the error object and a stable code, and a refusal changes nothing. The object, the codes every API shares and which of them to retry are on Errors. This page says what each code of this API means.
{
"code": "blocked_by_checks",
"message": "A blocking check still fails. Nothing was validated and the operation stays a draft.",
"requestId": "8134028b-b59a-47fd-b110-b17b42402ecb"
} A refusal changes nothing. After you fix the cause, repeat the request with the same operationId, or send a new change with a new one. See Idempotency and concurrency.
Codes of this API
The codes are grouped by HTTP status. The same status can carry several codes: read code, not only the status.
404: The record is not in your account
The identifier you sent does not match a record of your account.
| Code | Meaning | What to do |
|---|---|---|
employer_not_found | The employer does not exist in your account. | List the employers of the account and use one of their ids. |
contract_not_found | The contract does not exist in your account. | List the contracts of the employer and use one of their ids. |
register_operation_not_found | The register operation does not exist in your account. | Read the id from a list or from the operation result. |
permission_not_found | The access permission does not exist in your account. | List the access permissions of the employer and use one of their ids. |
subscription_not_found | The subscription does not exist in your account. | List the subscriptions and use one of their ids. |
delivery_not_found | The delivery does not exist in your account. | List the deliveries and use one of their ids. |
operation_not_found | No change was sent with this operationId. | Check the operationId; send the change if it was never sent. |
client_not_found | The API client does not exist in your account. | Read the clients of the account and use one of their ids. |
409: The state does not allow it
The request is valid, but the record is not in a state that allows it, or the change clashes with an earlier one.
| Code | Meaning | What to do |
|---|---|---|
invalid_status | The operation is not in a status that allows this. | Read the record again and use the operation that fits its state. |
not_permitted | The designated person does not hold the access permission this step needs for the employer, or it has ended. Nothing was changed. | Read the access permissions of the employer and use a person who holds the scope, or add one. |
same_person | The person who prepared the operation cannot approve it. | Approve with another designated person. |
reason_required | A reason is required: the deadline has passed, or the outcome of a transmission is being flagged as unknown. | Send the request again with reason. |
answer_incomplete | The answer is incomplete: registered needs a reference, rejected needs a message. | Send the answer again with the field its outcome needs. |
already_corrected | A correction of this operation already exists. | Read the correction through correctionOf and work on it. |
already_open | An operation of this kind is already being prepared for the contract. | List the register operations of the employer and work on the open one. |
already_permitted | This holder already has an access permission of this kind for the employer. | Extend the existing access permission or revoke it first. |
already_revoked | The access permission or the client was already revoked. | Nothing to do. |
already_extended | The access permission already runs to the end date an extension gives. | Nothing to do. |
endpoint_answering | The event endpoint already answers. | Nothing to do. |
endpoint_not_answering | The event endpoint still does not answer. The event stays parked. | Repair the endpoint, check it, then replay the event. |
nothing_to_retry | The delivery is not waiting for a retry. | Read the record again and use the operation that fits its state. |
nothing_parked | The delivery is not parked. | Read the record again and use the operation that fits its state. |
employer_exists | An employer with this CUI is already in your account. | Read the employer with the list of employers. |
422: The rules do not accept it
The request is well formed, but a rule refuses what it asks for.
| Code | Meaning | What to do |
|---|---|---|
blocked_by_checks | A blocking check still fails. Nothing was validated and the operation stays a draft. | Read the checks, fix the draft with editOperation and validate again. |
invalid_value | A value has the right type but the rules do not accept it: a date that does not exist, an amount that is not positive, an unknown kind of change for the contract. | Correct the value named in the request and send it again. |
When the register refuses
A refusal by the register is not an error of the API. The request that recorded the transmission was accepted; the register’s answer is recorded with recordAnswer and the operation becomes rejected, with the register’s words kept unchanged in message. See Lifecycle and statuses.