fix(cachekitio): surface HTTP 413 as a clear permanent "value too large" error#182
Conversation
…ge" error When the SaaS rejects an oversized value with 413, classify it PERMANENT (it already would via the generic 4xx branch) with an actionable message instead of "Client error: HTTP 413", so the graceful-degrade log reads "value too large" rather than a generic client error. Retrying never helps — the value must shrink — so the decorator degrades: runs uncached, once. Adds a unit regression (413 -> PERMANENT, message mentions "too large") and multi-MB SaaS E2E tests (chunked round-trip, overwrite-shrink, 413 ceiling) that exercise the server-side chunking landing in the SaaS backend. The E2E tests are sdk_e2e-marked and run against a live worker, not in default CI.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughAdds a dedicated HTTP 413 branch to ChangesHTTP 413 Permanent Error Classification and Chunking Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Surface an oversized-value rejection (HTTP
413) as a clear, permanent error in the SDK.Change
error_handler.py: a dedicated413branch →BackendErrorType.PERMANENTwith an actionable "value too large" message. (A413already classified PERMANENT via the generic 4xx branch; this gives a clearer message.) Retrying never helps — the value must shrink — so@cache.iodegrades once and runs uncached instead of retrying.Tests
413 → PERMANENT, message contains "too large".sdk_e2e, run against a live worker — not default CI): multi-MB value round-trips; direct-HTTP round-trip + overwrite returns exactly the new value; oversized PUT →413.Context
A multi-MB
@cache.iovalue previously surfaced a transient-classified error that the SDK retried before degrading silently. This makes the API's permanent "value too large" rejection (413) surface clearly and stop the wasted retries. The 25 MB max value size and413semantics are documented in the protocol spec.(Also bumps the pinned pyo3 to 0.29 via merge from
mainto clear RUSTSEC-2026-0176/0177 in the security gate.)Summary by CodeRabbit
Release Notes
Bug Fixes
Tests