Description
RateLimitParser parses the Retry-After header as an integer number of seconds using parseInt, which silently truncates fractional values (e.g., "1.5" becomes 1 s). Some Horizon nodes return sub-second retry hints.
Acceptance Criteria
Context
- Target file:
src/throttle/RateLimitParser.ts
- Return value unit is milliseconds throughout to match the rest of the throttle module
Description
RateLimitParserparses theRetry-Afterheader as an integer number of seconds usingparseInt, which silently truncates fractional values (e.g.,"1.5"becomes 1 s). Some Horizon nodes return sub-second retry hints.Acceptance Criteria
parseRetryAfter(value: string): numberusesparseFloatand returns millisecondsnullrather thanNaNContext
src/throttle/RateLimitParser.ts