| 1 | package Apertur::SDK::Error::RateLimit; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use parent 'Apertur::SDK::Error'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||
| 8 | 1 | my ($class, %args) = @_; | |||||||||||
| 9 | my $self = $class->SUPER::new( | ||||||||||||
| 10 | status_code => 429, | ||||||||||||
| 11 | code => 'RATE_LIMIT', | ||||||||||||
| 12 | 1 | ▶ | message => $args{message} // 'Rate limit exceeded', | ||||||||||
|
Condition50%1/2
$args{"message"} // "Rate limit exceeded"
MC/DC0%0/1
$args{"message"} // "Rate limit exceeded"
$args{"message"}
Truth table50%1/2
A
A= $args{"message"}
| |||||||||||||
| 13 | ); | ||||||||||||
| 14 | 1 | $self->{retry_after} = $args{retry_after}; | |||||||||||
| 15 | 1 | return $self; | |||||||||||
| 16 | } | ||||||||||||
| 17 | |||||||||||||
| 18 | 1 | ▶ | sub retry_after { return $_[0]->{retry_after} } | ||||||||||
|
Subroutine
retry_after: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 19 | |||||||||||||
| 20 | 1 | 1; | |||||||||||
| 21 | |||||||||||||
| 22 | __END__ | ||||||||||||