Skip to content

Conversation

@cryptomail
Copy link
Contributor

No description provided.

@cryptomail cryptomail requested a review from a team as a code owner October 12, 2025 22:30
original_env[:call_attempt] += 1
else
original_env[:call_attempt] = 1
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a test for values of these counts?

threshold: response_env[:response_headers] ? response_env[:response_headers][:x_rate_limit_remaining] : nil,
limit: response_env[:response_headers] ? response_env[:response_headers][:x_rate_limit] : nil,
reset: response_env[:response_headers] ? response_env[:response_headers][:x_rate_limit_reset] : nil
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

threshold, limit, and reset values don’t have any tests.

Comment on lines +30 to +33
threshold: response_env[:response_headers] ? response_env[:response_headers][:x_rate_limit_remaining] : nil,
limit: response_env[:response_headers] ? response_env[:response_headers][:x_rate_limit] : nil,
reset: response_env[:response_headers] ? response_env[:response_headers][:x_rate_limit_reset] : nil
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the header keys will be with hyphens, not underscores?

https://www.rubydoc.info/gems/faraday/Faraday/Utils/Headers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants