Skip Menu |

This queue is for tickets about the WebService-AbuseIPDB CPAN distribution.

Report information
The Basics
Id: 132655
Status: resolved
Priority: 0/
Queue: WebService-AbuseIPDB

People
Owner: HOUSTON [...] cpan.org
Requestors: HOUSTON [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: 0.03_01



Subject: 503 response from server treated as success
When the API server just returns a 503 to a check request, the CheckResponse object returns true for the "successful" method. eg: my $res = $ipdb->check (ip => $ip, max_age => 180, verbose => 999); unless ($res->successful) { my $err = $res->errors->[0]; die "Error $err->{status}: $err->{detail}\n"; } print Dumper ($res); results in: $VAR1 = bless( { 'body' => {}, 'data' => {}, 'meta' => { 'statusMessage' => '503 Service Unavailable', 'statusCode' => 1 } }, 'WebService::AbuseIPDB::CheckResponse' ); The "successful" method should be returning false in this case.
The error trapping has been updated to treat any of the 500-series server errors as unsuccessful. A test has been added too. This is in the ticket-specific branch at https://gitlab.com/openstrike/abuseipdb-client/-/tree/rt-132655 and will be included in the next release.