Error Codes
Katalog error code DYOGG — HTTP status, machine-readable code, human message.
Semua error response DYOGG menggunakan error.code machine-readable + error.message human-readable.
HTTP status ↔ error class
| Status | Class | Kapan terjadi |
|---|---|---|
400 | Bad Request | Format request salah (invalid UID, missing field). |
401 | Unauthenticated | Header Authorization hilang atau invalid. |
403 | Forbidden | API key valid tapi scope tidak cocok. |
404 | Not Found | Resource tidak ditemukan (UID, character ID, dsb). |
409 | Conflict | Duplicate submit (mis. Scam Report untuk UID+category+reporter sudah ada). |
422 | Unprocessable Entity | Business rule violation (mis. reporter melapor UID sendiri). |
429 | Rate Limited | Quota exceeded. |
500 | Internal Error | Bug kami — request_id akan otomatis di-alert ke on-call. |
502 | Bad Gateway | Upstream data provider error. |
503 | Service Unavailable | Circuit breaker aktif — upstream degraded. |
504 | Gateway Timeout | Upstream timeout >12s. |
Katalog error.code
Client errors
| Code | HTTP | Deskripsi |
|---|---|---|
invalid_uid | 400 | UID format salah (harus 9-10 digit angka). |
unknown_game | 400 | game param bukan genshin/hsr/zzz. |
missing_field | 400 | Field required kosong (error.field = nama field). |
invalid_body | 400 | Body JSON tidak parseable. |
unauthenticated | 401 | Header Bearer hilang / kadaluarsa. |
invalid_api_key | 401 | Format prefix salah (dyo_test_ / dyo_live_). |
insufficient_scope | 403 | Key tidak punya scope untuk endpoint ini. |
ip_not_allowlisted | 403 | Request datang dari IP di luar allowlist project. |
player_not_found | 404 | UID tidak ada atau showcase disembunyikan. |
character_not_found | 404 | Avatar ID tidak dikenali. |
resource_not_found | 404 | Resource ID lain tidak ada. |
duplicate_report | 409 | Report untuk kombinasi sama sudah exist. |
self_report_not_allowed | 422 | Reporter melapor UID sendiri. |
report_quota_exceeded | 422 | Reporter sudah lapor >5 kali hari ini. |
rate_limited | 429 | Bucket habis — cek Retry-After. |
Server / upstream errors
| Code | HTTP | Deskripsi |
|---|---|---|
internal_error | 500 | Bug kami. Reply ke support@dyogg.com dengan request_id. |
upstream_error | 502 | Data provider return error. |
upstream_unavailable | 503 | Circuit breaker aktif — retry setelah Retry-After detik. |
upstream_timeout | 504 | Provider >12s response. |
Retry policy
- Idempotent 5xx (GET): retry with exponential backoff — mulai 1s, kali 2, cap 60s, max 5x.
- 429: respect
Retry-Afterheader. - 4xx: jangan retry — fix request dulu.
- POST/PUT: hanya retry jika response 502/503/504 dan kamu YAKIN request idempotent (mis. sudah ada
X-Request-Idunique).
request_id
Setiap response menyertakan meta.request_id. Include ini di email support atau GitHub issue untuk
mempercepat investigasi log.