lib/Kubernetes/REST/RemoteError.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Kubernetes/REST/RbacAuthorization.pm ↑ Summary lib/Kubernetes/REST/Scheduling.pm »
1 package Kubernetes::REST::RemoteError;
2 2 our $VERSION = '1.109';
3 # ABSTRACT: Compatibility helper for deprecated v0 remote errors
4 2 ▶ use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶ use Types::Standard qw/Int/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶ use Kubernetes::REST::Error;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 extends 'Kubernetes::REST::Error';
8  
9 2 ▶ has '+type' => (default => sub { 'Remote' });
Subroutine __ANON__: called CC=1 SCAR=0.0
10 2 has status => (is => 'ro', isa => Int, required => 1);
11  
12  
13 5 ▶ around header => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
14 5 my ($orig, $self) = @_;
15 5 my $orig_message = $self->$orig;
16 5 sprintf "%s with HTTP status %d", $orig_message, $self->status;
17 2 };
18  
19  
20 2 1;
21  
22 __END__
23  
24 =pod
25  
26 =encoding UTF-8
27  
28 =head1 NAME
29  
30 Kubernetes::REST::RemoteError - Compatibility helper for deprecated v0 remote errors
31  
32 =head1 VERSION
33  
34 version 1.109
35  
36 =head1 DESCRIPTION
37  
38 This error class belongs to the deprecated v0 API - the v1 API never throws it: an HTTP error status dies with a L<Kubernetes::REST::APIError>, anything else croaks with a string. It stays around so code that still catches it keeps working.
39  
40 Thrown for errors reported by the cluster itself, carrying the HTTP status alongside the message of L<Kubernetes::REST::Error>.
41  
42 See L<Kubernetes::REST/"UPGRADING FROM 0.02"> for migration guide.
43  
44 =head2 status
45  
46 HTTP status code.
47  
48 =head1 SEE ALSO
49  
50 =over
51  
52 =item * L<Kubernetes::REST> - Main API client
53  
54 =item * L<Kubernetes::REST::Error> - The base error class
55  
56 =back
57  
58 =head1 SUPPORT
59  
60 =head2 Issues
61  
62 Please report bugs and feature requests on GitHub at
63 L<https://github.com/pplu/kubernetes-rest/issues>.
64  
65 =head2 IRC
66  
67 Join C<#kubernetes> on C<irc.perl.org> or message Getty directly.
68  
69 =head1 CONTRIBUTING
70  
71 Contributions are welcome! Please fork the repository and submit a pull request.
72  
73 =head1 AUTHORS
74  
75 =over 4
76  
77 =item *
78  
79 Torsten Raudssus <getty@cpan.org>
80  
81 =item *
82  
83 Jose Luis Martinez Torres <jlmartin@cpan.org>
84  
85 =back
86  
87 =head1 COPYRIGHT AND LICENSE
88  
89 This software is Copyright (c) 2019-2026 by Jose Luis Martinez Torres <jlmartin@cpan.org>.
90  
91 This is free software, licensed under:
92  
93 The Apache License, Version 2.0, January 2004
94  
95 =cut
« lib/Kubernetes/REST/RbacAuthorization.pm ↑ Summary lib/Kubernetes/REST/Scheduling.pm »