File Coverage

blib/lib/Apertur/SDK/Error/Validation.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition 1 2 50.0
subroutine 4 4 100.0
pod 1 1 100.0
total 17 18 94.4


line stmt bran cond sub pod time code
1             package Apertur::SDK::Error::Validation;
2              
3 1     1   5 use strict;
  1         2  
  1         30  
4 1     1   3 use warnings;
  1         2  
  1         35  
5 1     1   3 use parent 'Apertur::SDK::Error';
  1         2  
  1         4  
6              
7             sub new {
8 1     1 1 4 my ($class, %args) = @_;
9             return $class->SUPER::new(
10             status_code => 400,
11             code => 'VALIDATION_ERROR',
12 1   50     11 message => $args{message} // 'Validation error',
13             );
14             }
15              
16             1;
17              
18             __END__