Simplifies the rate limiter by only looking at the ttl to construct the after message — this aligns the message with the Retry-After header; before, it would just send the timeWindow, which is inaccurate
So even if a user had 5 seconds left, if the timeWindow was 50 seconds, the error would say, "Retry in 50 seconds" and not "Retry in 5 seconds"
Simplifies the rate limiter by only looking at the
ttl
to construct theafter
message — this aligns the message with theRetry-After
header; before, it would just send thetimeWindow
, which is inaccurateSo even if a user had 5 seconds left, if the
timeWindow
was 50 seconds, the error would say,"Retry in 50 seconds"
and not"Retry in 5 seconds"