v0.2.8: Rate-limit error contract fix across all 5 tools
Rate-limit error contract fix across all 5 tools
All 5 tool handlers now route rate-limit throws from the service layer through ctx.fail() so the framework's contract-correlation machinery auto-populates retryable and recovery.hint.
Fixed:
- Rate-limit error routing — all 5 tool handlers wrap the service call in try/catch and re-throw rate-limit errors via ctx.fail('rate_limit_exceeded') instead of letting the service factory throw bypass the contract entry (#22).
- Error code — corrected from JsonRpcErrorCode.ServiceUnavailable (-32000) to JsonRpcErrorCode.RateLimited (-32003) in all 5 contracts.
- retryable: false — added to each rate_limit_exceeded contract entry; framework retry machinery now receives an explicit do-not-retry signal for the 1-hour block window.
- Test — libofcongress-search rate-limit test updated to pass errors contract to createMockContext.
151 tests pass; bun run devcheck clean.