deftinc / feature_gate

MIT License
0 stars 2 forks source link

add is_enabled test for the case when rate limiting error is returned #16

Closed vinbarnes closed 1 month ago

vinbarnes commented 1 month ago

Addresses #13

Currently when PosthogAPIClient#is_enabled receives a status_code of 429 indicating rate limiting a FeatureNotFound error is raised. This adds a test verifying that behavior.

thephw commented 1 month ago

Well that is curious.

vinbarnes commented 1 month ago

Is this good enough? Or does it reveal that we need to return something else?

thephw commented 1 month ago

I think we want to return something else -- RateLimitError or similar

vinbarnes commented 1 month ago

I think we want to return something else -- RateLimitError or similar

Introduced RateLimitError and raises when detected.

thephw commented 1 month ago

Lets merge 👍🏻