File Coverage

blib/lib/Net/Async/Zitadel/Error.pm
Criterion Covered Total %
statement 25 25 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod n/a
total 34 34 100.0


line stmt bran cond sub pod time code
1             package Net::Async::Zitadel::Error;
2              
3             # ABSTRACT: Structured exception classes for Net::Async::Zitadel
4              
5 4     4   30 use Moo;
  4         9  
  4         47  
6              
7             # namespace::clean must NOT be used here: it would strip the overload
8             # operator stub installed by 'use overload' below.
9 4     4   2309 use overload '""' => sub { $_[0]->message }, fallback => 1;
  4     47   8  
  4         52  
  47         26130  
10              
11             our $VERSION = '0.001';
12              
13              
14             has message => (
15             is => 'ro',
16             required => 1,
17             );
18              
19             package Net::Async::Zitadel::Error::Validation;
20              
21 4     4   685 use Moo;
  4         9  
  4         19  
22             extends 'Net::Async::Zitadel::Error';
23 4     4   4352 use namespace::clean;
  4         108734  
  4         36  
24              
25             package Net::Async::Zitadel::Error::Network;
26              
27 4     4   1430 use Moo;
  4         11  
  4         40  
28             extends 'Net::Async::Zitadel::Error';
29 4     4   2155 use namespace::clean;
  4         16  
  4         21  
30              
31             package Net::Async::Zitadel::Error::API;
32              
33 4     4   1468 use Moo;
  4         11  
  4         49  
34             extends 'Net::Async::Zitadel::Error';
35 4     4   1955 use namespace::clean;
  4         39  
  4         37  
36              
37              
38             has http_status => ( is => 'ro' );
39             has api_message => ( is => 'ro' );
40              
41             1;
42              
43             __END__