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

# Hatalar

> API hata kodlari ve islenme yontemleri

## Hata formati

Tum hatalar, `detail` alani iceren bir JSON yaniti dondurur:

```json theme={null}
{
  "detail": "Insufficient balance"
}
```

Bazi hatalar, programatik isleme icin yapilandirilmis bir `code` icermektedir:

```json theme={null}
{
  "detail": {
    "error": {
      "code": "INSUFFICIENT_BALANCE",
      "message": "Not enough TRX balance"
    }
  }
}
```

## HTTP Durum Kodlari

| Kod   | Anlam                                             |
| ----- | ------------------------------------------------- |
| `200` | Basarili                                          |
| `400` | Hatali istek — gecersiz parametreler              |
| `401` | Yetkisiz — eksik veya gecersiz API anahtari       |
| `403` | Yasakli — anahtar devre disi veya islem izni yok  |
| `404` | Bulunamadi                                        |
| `409` | Catisma — tekrarlanan istek veya kaynak catismasi |
| `422` | Dogrulama hatasi — istek govdesini kontrol edin   |
| `429` | Hiz siniri asildi                                 |
| `500` | Sunucu hatasi                                     |

## Yaygin hata kodlari

| Kod                      | Aciklama                                                 |
| ------------------------ | -------------------------------------------------------- |
| `INSUFFICIENT_BALANCE`   | Bu islem icin hesap bakiyesi yetersiz                    |
| `ADDRESS_ALREADY_ACTIVE` | Bu adres icin Akilli Mod zaten aktif                     |
| `ORDER_NOT_FOUND`        | Siparis kimlik numarasi mevcut degil                     |
| `INVALID_ADDRESS`        | Gecerli bir TRON adresi degil                            |
| `RATE_LIMITED`           | Cok fazla istek, bekleme suresinden sonra tekrar deneyin |
| `PASSKEY_REQUIRED`       | Cekim icin passkey dogrulamasi gerekli                   |
| `2FA_REQUIRED`           | Cekim icin 2FA kodu gerekli                              |

## Yeniden deneme stratejisi

`429` ve `5xx` hatalari icin ustel geri cekilme uygulayin:

```python theme={null}
import time
import requests

def api_call_with_retry(url, **kwargs):
    for attempt in range(3):
        resp = requests.get(url, **kwargs)
        if resp.status_code == 429 or resp.status_code >= 500:
            time.sleep(2 ** attempt)
            continue
        return resp
    raise Exception("Max retries exceeded")
```
