VẬN HÀNH API
Lỗi, retry, giới hạn tốc độ và timeout
Lỗi máy đọc có type ổn định, hướng khắc phục và hành vi retry rõ ràng.
01
Chi tiết lỗi
{
"type": "https://quantumsafe.mobile-id.vn/problems/signing-profile-not-allowed",
"title": "Signing profile is not allowed",
"status": 422,
"detail": "The requested profile is not approved for this tenant and CA route.",
"instance": "/v1/signing-requests/sr_...",
"correlationId": "...",
"retryable": false
}02
Header vận hành
| Header | Purpose |
|---|---|
| Retry-After | Polling/rate-limit/backpressure guidance |
| X-RateLimit-Limit | Window request limit |
| X-RateLimit-Remaining | Remaining requests |
| X-RateLimit-Reset | Window reset time |
| ETag / If-Match | Optimistic concurrency for mutable resources |
| Location | Created/asynchronous resource URI |
03
Chính sách retry
| Class | Retry? | Client behavior |
|---|---|---|
| 401/403 auth or scope | No automatic retry | Refresh credentials or correct authorization |
| 409 idempotency/state conflict | Conditional | Read resource and reconcile state |
| 422 policy/validation | No | Correct request/profile |
| 429 rate limit | Yes | Honor Retry-After |
| 502/503 provider unavailable | Conditional | Backoff; do not duplicate protected operation |
| 504 timeout | Read before retry | Resolve resource by idempotency key/correlation |
