> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livingsecurity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kļūdu atsauce

> Visas kļūdas, ko var atgriezt Living Security /v1 publiskais API, ar to stabilo mašīnlasāmo kodu, HTTP statusu un risināšanas norādēm.

Katra `/v1` kļūdas atbilde ir `application/problem+json` ([RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)) ar fiksētu lauku kopu:

```json theme={null}
{
  "type": "https://docs.livingsecurity.com/developers/v1/errors/resource_not_found",
  "title": "Not Found",
  "status": 404,
  "detail": "No such organization.",
  "code": "resource_not_found",
  "request_id": "req_...",
  "doc_url": "https://docs.livingsecurity.com/developers/v1/errors/resource_not_found",
  "retryable": false
}
```

Atzarojiet loģiku pēc `code`, nekad pēc `detail` — `code` ir stabils mašīnlasāms līgums, savukārt `detail` ir cilvēkam lasāms un var mainīties. `param` ir norādīts, ja kļūdu var attiecināt uz konkrētu pieprasījuma parametru. Sazinoties ar atbalsta komandu, pievienojiet `request_id`.

## Kļūdu kodi

| Kods | HTTP statuss | Atkārtojams |
| - | - | - |
| [`unauthorized`](/lv/developers/v1/errors/unauthorized) | 401 | Nē |
| [`credential_inactive`](/lv/developers/v1/errors/credential_inactive) | 401 | Nē |
| [`credential_expired`](/lv/developers/v1/errors/credential_expired) | 401 | Nē |
| [`credential_revoked`](/lv/developers/v1/errors/credential_revoked) | 401 | Nē |
| [`not_entitled`](/lv/developers/v1/errors/not_entitled) | 403 | Nē |
| [`insufficient_permission`](/lv/developers/v1/errors/insufficient_permission) | 403 | Nē |
| [`permission_denied`](/lv/developers/v1/errors/permission_denied) | 403 | Nē |
| [`resource_not_found`](/lv/developers/v1/errors/resource_not_found) | 404 | Nē |
| [`invalid_request`](/lv/developers/v1/errors/invalid_request) | 400 vai 409 | Nē |
| [`invalid_filter`](/lv/developers/v1/errors/invalid_filter) | 400 | Nē |
| [`unsupported_version`](/lv/developers/v1/errors/unsupported_version) | 400 | Nē |
| [`idempotency_key_reuse`](/lv/developers/v1/errors/idempotency_key_reuse) | 409 | Atkarīgs no konflikta |
| [`rate_limited`](/lv/developers/v1/errors/rate_limited) | 429 | Jā |
| [`service_unavailable`](/lv/developers/v1/errors/service_unavailable) | 503 | Jā |
| [`internal_error`](/lv/developers/v1/errors/internal_error) | 500 | Jā |

Kodu kopa ir slēgta: jauni kodi ir publiska līguma izmaiņas, un par tiem tiek paziņots API izmaiņu žurnālā. `retryable: true` atbilde nozīmē, ka situācija var atrisināties; tā nepierāda, ka rakstīšanas darbībai nebija nekādas ietekmes. Lasīšanas pieprasījumus atkārtojiet ar ierobežotu mēģinājumu skaitu un laika budžetu, izmantojot eksponenciālo atkāpšanos un jitteru. Ņemiet vērā `Retry-After`, ja tas ir norādīts, arī atkārtojamas `409` vai `429` gadījumā.

Mutācijām ievērojiet attiecīgās darbības dokumentēto idempotences un atkopšanas līgumu. Ja tas tiek atbalstīts, saglabājiet sākotnējo atslēgu un pieprasījumu. Neizveidojiet jaunu atslēgu pēc noildzes vai `5xx`: tas var atkārtot sekmīgi veiktu rakstīšanu. Galvene `Idempotency-Key` nesniedz nekādu aizsardzību darbībai, kas to neatbalsta.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.