michenriksen / hibp

A simple tool to check a bunch of email addresses against the Have I Been Pwned API.
https://rubygems.org/gems/hibp
MIT License
65 stars 20 forks source link

HTTPClient::ClientError #2

Open 0xspade opened 6 years ago

0xspade commented 6 years ago

Is this normal? or Rate limits of the API?

 [⚡]  ACCOUNT CHECKS THAT ENCOUNTERED ERROR:
  * <redacted>@gmail.com: Hibp::HttpClient::ClientError: GET to https://haveibeenpwned.com/api/breachedaccount/<redacted>%40gmail.com returned status 429 - options: {:query=>nil}
  * <redacted>@gmail.com: Hibp::HttpClient::ClientError: GET to https://haveibeenpwned.com/api/breachedaccount/<redacted>%40gmail.com returned status 429 - options: {:query=>nil}
0xspade commented 6 years ago

hey @michenriksen

as the haveibeenpwned.com says that

Adding a 100 millisecond delay between requests will usually ensure this won't happen.

maybe you can implement this to avoid rate limitting :D