| 1 | package WWW::Authentik::Error::API; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Raised when authentik answers with an HTTP error | ||||||||||
| 4 | |||||||||||
| 5 | 7 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 7 | extends 'WWW::Authentik::Error'; | |||||||||
| 7 | |||||||||||
| 8 | 7 | our $VERSION = '0.001'; | |||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | 7 | has http_status => ( | |||||||||
| 12 | is => 'ro', | ||||||||||
| 13 | required => 1 | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | 7 | has api_message => ( is => 'ro' ); | |||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | has field_errors => ( is => 'ro', default => sub { {} } ); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | 7 | has oauth_error => ( is => 'ro' ); | |||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | 7 | has request_id => ( is => 'ro' ); | |||||||||
| 27 | |||||||||||
| 28 | |||||||||||
| 29 | 7 | has body => ( is => 'ro' ); | |||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | 2 | ▶ | sub is_bad_request { $_[0]->http_status == 400 ? 1 : 0 } | ||||||||
|
Subroutine
is_bad_request: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 33 | 3 | ▶ | sub is_unauthorized { $_[0]->http_status == 401 ? 1 : 0 } | ||||||||
|
Subroutine
is_unauthorized: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 34 | 2 | ▶ | sub is_forbidden { $_[0]->http_status == 403 ? 1 : 0 } | ||||||||
|
Subroutine
is_forbidden: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 35 | 14 | ▶ | sub is_not_found { $_[0]->http_status == 404 ? 1 : 0 } | ||||||||
|
Subroutine
is_not_found: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | |||||||||||
| 38 | 7 | 1; | |||||||||
| 39 | |||||||||||
| 40 | __END__ | ||||||||||