> For the complete documentation index, see [llms.txt](https://micup.renbow.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://micup.renbow.dev/hatalar.md).

# Hatalar

## `MicupAPIError`

Tüm kütüphane hataları bu sınıftan türer.

| Alan      | Açıklama                                                                       |
| --------- | ------------------------------------------------------------------------------ |
| `status`  | HTTP durum kodu. Yerel hatalarda `0`.                                          |
| `code`    | Hata kodu (aşağıdaki tablo ya da sunucudan gelen kod).                         |
| `message` | İnsan okunabilir mesaj.                                                        |
| `body`    | Sunucudan gelen ham yanıt. Doğrulama hatalarında `errors` listesi burada olur. |

`MicupError` aynı sınıfın kısa adıdır.

```python
from micup import MicupAPIError

try:
    await bot.rest("PATCH", ...)
except MicupAPIError as e:
    print(e.code, e.message)
    print(e.body.get("errors"))  # hangi alan hatalı
```

## Kütüphane hata kodları

| Kod                   | Anlamı                                    |
| --------------------- | ----------------------------------------- |
| `VOICE_TIMEOUT`       | Grant `timeout` içinde gelmedi.           |
| `VOICE_NOT_CONNECTED` | Bu sunucuda bağlı bir ses bağlantısı yok. |
| `LIVEKIT_MISSING`     | `livekit` paketi kurulu değil.            |
| `DISCOVERY_FAILED`    | Micup keşif belgesi alınamadı.            |
| `RATE_LIMITED`        | Yeniden deneme sınırı aşıldı.             |

## Sunucu hata kodları (örnekler)

| Kod                   | Anlamı                                                                   |
| --------------------- | ------------------------------------------------------------------------ |
| `INVALID_FORM_BODY`   | Gövde geçersiz. `body["errors"]` hangi alanın sorunlu olduğunu gösterir. |
| `MISSING_PERMISSIONS` | Bot gerekli yetkiye sahip değil.                                         |
| `UNKNOWN_MEMBER`      | Üye bulunamadı.                                                          |
| `UNKNOWN_GUILD`       | Sunucu bulunamadı.                                                       |
| `TWO_FACTOR_REQUIRED` | Sunucu 2FA istiyor.                                                      |

## Gateway kapanma kodları

| Kod                          | Davranış                                      |
| ---------------------------- | --------------------------------------------- |
| 4004, 4010, 4011, 4012       | Yeniden denenmez. Örn. 4004 geçersiz token.   |
| 4001, 4002, 4003, 4005, 4007 | Oturum sıfırlanır, yeniden kimlik doğrulanır. |
| 4008                         | Hız sınırı. 30 saniye beklenir.               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://micup.renbow.dev/hatalar.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
