Subject: | unbreached accounts should not result in an error being thrown |
Date: | Wed, 24 Apr 2019 11:37:29 +1000 |
To: | bug-webservice-hibp [...] rt.cpan.org |
From: | Matthew Meldrum <meldrum [...] osisecurity.com.au> |
Explanation:
If you are checking accounts, and an email address is not breached, this
returns a 404 from the site. WebService::HIBP treats this as an error. If I
am checking a lot of accounts, I would prefer it if WebService::HIBP
returned an empty list of breaches instead of throwing an error? Or some
other way to handle a non-hit other than Carp::Croak().
to reproduce:
foreach my $breach ($hibp->account("this-account_does_not_exist_in\@hibp.com"))
{
push(@sites,$breach->title());
}
If I am in error, could you be so kind as to explain how to handle non-hit
results?
Thanks,
Matthew