Repository navigation
RayRAG v0.10.1 — HTTP status and business code, separated as documented
Pre-releaseRayRAG v0.10.1
The business-code contract from the API guide
The guide is explicit: the HTTP status and the body's business code are two separate signals and
must be checked separately. RayRAG was wrong in both directions — api_error set the body code to
the HTTP status (so the documented 101/102/108/109 never appeared), while some newer endpoints
answered HTTP 200 with code 102 (so a client reading only the status saw success).
New constructors now pair the documented status with the documented code, and the guide's table lives
in code as crate::server::code:
| business code | meaning | HTTP |
|---|---|---|
| 101 | invalid argument | 400 |
| 102 | invalid or missing data (includes "you don't own …") | 400 |
| 103 | operation error | 400 |
| 105 | connection error | 502 |
| 106 | still running | 400 |
| 108 | no permission | 403 |
| 109 | unauthenticated | 401 |
| 409 | conflict | 409 |
Measured live:
GET /datasets/{id}/artifacts/nonsense -> HTTP 400
{"code":102,"message":"Unknown artifact page type
'nonsense'. Supported: structure, graph, …"}
container panics -> 0
The artifact and navigation paths are migrated; the older endpoints still use api_error, and the
internal registry says so explicitly — unmigrated is recorded as unmigrated.
2157 tests pass, 0 failures, including a new regression that asserts every constructor returns the
documented pair and never an empty explanation.