line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package XML::SRS::Error; |
3
|
|
|
|
|
|
|
BEGIN { |
4
|
1
|
|
|
1
|
|
6183
|
$XML::SRS::Error::VERSION = '0.09'; |
5
|
|
|
|
|
|
|
} |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
452
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use PRANG::Graph; |
9
|
|
|
|
|
|
|
use Moose::Util::TypeConstraints; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub root_element {"Error"} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has_attr "error_id" => |
14
|
|
|
|
|
|
|
is => "ro", |
15
|
|
|
|
|
|
|
isa => "Str", |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
xml_name => "ErrorId", |
18
|
|
|
|
|
|
|
; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
enum "XML::SRS::Error::Severity" => |
21
|
|
|
|
|
|
|
qw( alert crit err ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has_attr "severity" => |
24
|
|
|
|
|
|
|
is => "ro", |
25
|
|
|
|
|
|
|
isa => "XML::SRS::Error::Severity", |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
xml_name => "Severity", |
28
|
|
|
|
|
|
|
; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has_attr "hint" => |
31
|
|
|
|
|
|
|
is => "ro", |
32
|
|
|
|
|
|
|
isa => "Str", |
33
|
|
|
|
|
|
|
required => 1, |
34
|
|
|
|
|
|
|
xml_name => "Hint", |
35
|
|
|
|
|
|
|
; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has_element "desc" => |
38
|
|
|
|
|
|
|
is => "ro", |
39
|
|
|
|
|
|
|
isa => "Str", |
40
|
|
|
|
|
|
|
xml_nodeName => "Description", |
41
|
|
|
|
|
|
|
; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has_element "details" => |
44
|
|
|
|
|
|
|
is => "ro", |
45
|
|
|
|
|
|
|
isa => "ArrayRef[Str]", |
46
|
|
|
|
|
|
|
xml_min => 0, |
47
|
|
|
|
|
|
|
xml_nodeName => "ErrorDetails", |
48
|
|
|
|
|
|
|
auto_deref => 1, |
49
|
|
|
|
|
|
|
; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
with 'XML::SRS::ActionResponse'; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
use constant ERROR_DETAILS_NAMES => { |
54
|
|
|
|
|
|
|
map { |
55
|
|
|
|
|
|
|
if ( my ($error_id, $fields) = m{(\w+)\t(\S.*)} ) { |
56
|
|
|
|
|
|
|
my @fields = split /[;,]\s*/, $fields; |
57
|
|
|
|
|
|
|
($error_id => \@fields) |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
else { |
60
|
|
|
|
|
|
|
(); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} split /\n/, |
63
|
|
|
|
|
|
|
<<ERRORS }; |
64
|
|
|
|
|
|
|
CONFLICTING_RESULTS_PARAMETERS |
65
|
|
|
|
|
|
|
DELETE_FLAG_WITH_OTHER_FIELDS |
66
|
|
|
|
|
|
|
DOMAIN_CANCEL_AND_RENEW |
67
|
|
|
|
|
|
|
INVALID_FIELDSET |
68
|
|
|
|
|
|
|
MISSING_MANDATORY_FIELD fieldName; ?elementName; ?FieldName; ?FieldName |
69
|
|
|
|
|
|
|
PUBLIC_KEY_INVALID |
70
|
|
|
|
|
|
|
SIG_INVALID |
71
|
|
|
|
|
|
|
SIG_VERIFY_FAILED |
72
|
|
|
|
|
|
|
UNKNOWN_REGISTRAR registrarId |
73
|
|
|
|
|
|
|
DOMAIN_ASSIGNED_TO_NON_REGISTRAR registrarId |
74
|
|
|
|
|
|
|
LOCK_ATTEMPT |
75
|
|
|
|
|
|
|
MODERATED_DOMAIN_VIOLATION operation, ?domainName |
76
|
|
|
|
|
|
|
NOT_PERMITTED_TO_FILTER_REGISTRAR_BY_NAME |
77
|
|
|
|
|
|
|
PERMISSION_DENIED missingPermission |
78
|
|
|
|
|
|
|
UDAI_DOMAIN_MISMATCH domainName |
79
|
|
|
|
|
|
|
ALREADY_ACKED_MESSAGE originatingRegistrarId; actionId |
80
|
|
|
|
|
|
|
DOMAIN_ALREADY_EXISTS domainName |
81
|
|
|
|
|
|
|
HANDLE_ALREADY_EXISTS |
82
|
|
|
|
|
|
|
JOB_ALREADY_EXISTS jobName, firstRunTime, ?parameters |
83
|
|
|
|
|
|
|
LIST_ENTRY_ALREADY_EXISTS |
84
|
|
|
|
|
|
|
EFFECTIVE_REGISTRAR_DOES_NOT_EXIST effecitveRegistrarId |
85
|
|
|
|
|
|
|
HANDLE_DOES_NOT_EXIST |
86
|
|
|
|
|
|
|
JOB_UNKNOWN jobName, ?parameters |
87
|
|
|
|
|
|
|
ALLOWED_2LD_FOR_REGISTRAR registrarId |
88
|
|
|
|
|
|
|
CANCELLED_TRANSFER_WITH_UPDATE domainName |
89
|
|
|
|
|
|
|
DOMAIN_INACTIVE domainName |
90
|
|
|
|
|
|
|
DOMAIN_IS_NOT_CANCELLED domainName |
91
|
|
|
|
|
|
|
DOMAIN_LOCKED domainName |
92
|
|
|
|
|
|
|
DOMAIN_WITH_BILL_DAY |
93
|
|
|
|
|
|
|
OWNERSHIP_RESTRICTION ?domainName |
94
|
|
|
|
|
|
|
RENEW_NOT_REQUIRED domainName |
95
|
|
|
|
|
|
|
TRANSFER_WITHIN_GRACE_PERIOD domainName |
96
|
|
|
|
|
|
|
HANDLE_IN_USE |
97
|
|
|
|
|
|
|
REMOVING_REGISTRAR_ROLE |
98
|
|
|
|
|
|
|
ACTION_ID_ALREADY_USED actionId |
99
|
|
|
|
|
|
|
BILLED_UNTIL_IN_PAST |
100
|
|
|
|
|
|
|
BILLED_UNTIL_TOO_FAR_IN_FUTURE |
101
|
|
|
|
|
|
|
FINAL_RUNTIME_BEFORE_FIRST_RUNTIME |
102
|
|
|
|
|
|
|
FIRST_RUNTIME_PAST |
103
|
|
|
|
|
|
|
FREQUENCY_TOO_SMALL |
104
|
|
|
|
|
|
|
HANDLE_ID_WITH_CONTACT_FIELDS |
105
|
|
|
|
|
|
|
IDN_DOMAINNAME_MISMATCH domain, domainnameunicode, domainnamepunycode |
106
|
|
|
|
|
|
|
IDN_INVALID_CHARACTER domain, domainnameunicode |
107
|
|
|
|
|
|
|
IDN_INVALID_DOMAINNAME domain, domainnameunicode |
108
|
|
|
|
|
|
|
IDN_INVALID_UNICODE domain, domainnameunicode |
109
|
|
|
|
|
|
|
IDN_MALFORMED_DOMAINNAME domain, domainnameunicode |
110
|
|
|
|
|
|
|
IDN_UNDEFINED_UNICODE domain, domainnameunicode |
111
|
|
|
|
|
|
|
IDN_UNICODE_MISMATCH domain, domainnameunicode, domainnameunicode |
112
|
|
|
|
|
|
|
INSUFFICIENT_TERM_FOR_RENEW domainName |
113
|
|
|
|
|
|
|
INVALID_ADDRESS |
114
|
|
|
|
|
|
|
INVALID_ADDRESS_FILTER |
115
|
|
|
|
|
|
|
INVALID_CCTLD domainName |
116
|
|
|
|
|
|
|
INVALID_DATE_RANGE fieldName; ?fieldName; ?fieldName |
117
|
|
|
|
|
|
|
INVALID_EFFECTIVE_REGISTRAR_ID_IN_CreateRegistrar effectiveRegistrarId; ?requestedRegistrarId |
118
|
|
|
|
|
|
|
INVALID_EXPLICIT_REGISTRAR_ID requestedRegistrarId |
119
|
|
|
|
|
|
|
INVALID_PASSWORD EPPAuth |
120
|
|
|
|
|
|
|
INVALID_REGISTRAR_ID_FILTER |
121
|
|
|
|
|
|
|
INVALID_WILDCARD_IN_DOMAINNAMEFILTER |
122
|
|
|
|
|
|
|
IP4ADDR_NOT_ALLOWED IP4Addr; FQDN; domainName |
123
|
|
|
|
|
|
|
IP6ADDR_NOT_ALLOWED IP6Addr; FQDN; domainName |
124
|
|
|
|
|
|
|
MULTIPLE_VALUE_IN_FIELD fieldName; ?fieldName; ?fieldName; ?fieldName |
125
|
|
|
|
|
|
|
NAMESERVERS_EXCEEDED_MAX maxnameServers |
126
|
|
|
|
|
|
|
NAME_SERVER_DUPLICATION duplicateNameServer; ?domainName |
127
|
|
|
|
|
|
|
NUMBER_OF_FILTERS_EXCEEDS_MAX numberOfFilters; fieldName; maxFilterValues |
128
|
|
|
|
|
|
|
PAST_EFFECTIVE_DATE |
129
|
|
|
|
|
|
|
RENEWAL_EXCEEDS_MAX expectedBilledUntilDate; maxBillingTermInMonths; domainName |
130
|
|
|
|
|
|
|
RENEW_REQUIRES_TERM domainName |
131
|
|
|
|
|
|
|
RUNLOG_QRY_PARAM_WITHOUT_PROCESS |
132
|
|
|
|
|
|
|
SELF_SERVING_DNS_VIOLATION domainName, ?nameServer |
133
|
|
|
|
|
|
|
TERM_EXCEEDS_MAX maxRegistrationPeriod |
134
|
|
|
|
|
|
|
UNDEFINED_VALUE fieldName; ?fieldName; ?fieldName; ?fieldName |
135
|
|
|
|
|
|
|
ZERO_TERM_RENEW |
136
|
|
|
|
|
|
|
DOMAIN_BLOCKED domainName |
137
|
|
|
|
|
|
|
DOUBLE_CANCEL_ATTEMPT domainName |
138
|
|
|
|
|
|
|
HANDLE_ID_ON_REGISTRAR_CREATE |
139
|
|
|
|
|
|
|
IDN_NOT_ALLOWED domain |
140
|
|
|
|
|
|
|
MULTIPLE_DOMAIN_TRANSFER |
141
|
|
|
|
|
|
|
REGISTRY_MUST_BE_EFFECTIVE_REGISTRAR |
142
|
|
|
|
|
|
|
REGISTRY_MUST_NOT_BE_EFFECTIVE_REGISTRAR |
143
|
|
|
|
|
|
|
INVALID_RESPONSE_RECEIVED_FROM_SERVER response |
144
|
|
|
|
|
|
|
INVALID_SIGNATURE_RECEIVED_FROM_SERVER response; signature; pgpError |
145
|
|
|
|
|
|
|
MISSING_REQUEST_OBJECT |
146
|
|
|
|
|
|
|
MISSING_SIGNATURE_RECEIVED_FROM_SERVER response |
147
|
|
|
|
|
|
|
REQUEST_COULD_NOT_BE_SIGNED |
148
|
|
|
|
|
|
|
CONSENT_ERROR extraInfo |
149
|
|
|
|
|
|
|
INCORRECT_EFFECTIVE_REGISTRAR |
150
|
|
|
|
|
|
|
INSECURE_UPDATE |
151
|
|
|
|
|
|
|
INVALID_EFFECTIVE_REGISTRAR |
152
|
|
|
|
|
|
|
INVALID_FIELD value; fieldName; ?fieldName; ?fieldName; ?fieldName |
153
|
|
|
|
|
|
|
LOCK_ERROR details |
154
|
|
|
|
|
|
|
MESSAGE_TOO_LARGE sizeLimit; messageSize |
155
|
|
|
|
|
|
|
NO_ACTION |
156
|
|
|
|
|
|
|
NO_MESSAGE_FILTER_VALUES |
157
|
|
|
|
|
|
|
REQUEST_TOO_LONG requestSize, maxSize |
158
|
|
|
|
|
|
|
UNEXPECTED_FIELD fieldName; ?fieldName; ?fieldName |
159
|
|
|
|
|
|
|
UNKNOWN_TRANSACTION_TYPE transactionType |
160
|
|
|
|
|
|
|
CLIENT_SYSTEM_ERROR ?systemMessage |
161
|
|
|
|
|
|
|
RESPONSE_TRANSACTION_NUMBER_MISMATCH transactions; responses |
162
|
|
|
|
|
|
|
MALFORMED_TRANSACTION_RESPONSE fieldName; ?fieldName; ?fieldName; ?fieldName |
163
|
|
|
|
|
|
|
NO_RESPONSE_RECEIVED_FROM_SERVER |
164
|
|
|
|
|
|
|
CONCURRENT_ACK |
165
|
|
|
|
|
|
|
EXTRA_POST_PARAMETERS parameterName, ?parameterName, ?parameterName, ?parameterName, ?parameterName |
166
|
|
|
|
|
|
|
INTERNAL_ERROR |
167
|
|
|
|
|
|
|
MISSING_POST_PARAMETERS parameterName, ?parameterName, ?parameterName, ?parameterName, ?parameterName |
168
|
|
|
|
|
|
|
SYSTEM_ERROR ?systemMessage |
169
|
|
|
|
|
|
|
SYSTEM_MAINTENANCE |
170
|
|
|
|
|
|
|
SYSTEM_MIGRATION |
171
|
|
|
|
|
|
|
SYSTEM_OFFLINE |
172
|
|
|
|
|
|
|
SYSTEM_READONLY |
173
|
|
|
|
|
|
|
UNDETERMINED_RESULT |
174
|
|
|
|
|
|
|
VERMAJOR_TOO_HIGH VerMajor |
175
|
|
|
|
|
|
|
WRONG_MIME_TYPE expected; received |
176
|
|
|
|
|
|
|
XML_PARSE_ERROR xmlErrorString |
177
|
|
|
|
|
|
|
ERRORS |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
sub named_details { |
180
|
|
|
|
|
|
|
my $self = shift; |
181
|
|
|
|
|
|
|
my @named_details; |
182
|
|
|
|
|
|
|
my $names = ERROR_DETAILS_NAMES->{$self->error_id} || []; |
183
|
|
|
|
|
|
|
my @details = $self->details; |
184
|
|
|
|
|
|
|
my @names = map { $names->[$_] } 0..$#details; |
185
|
|
|
|
|
|
|
return () unless @details; |
186
|
|
|
|
|
|
|
if (@details % 2 |
187
|
|
|
|
|
|
|
or grep { ($names[$_*2+1]||"") ne "fieldName" } |
188
|
|
|
|
|
|
|
0..($#details>>1) |
189
|
|
|
|
|
|
|
) |
190
|
|
|
|
|
|
|
{ |
191
|
|
|
|
|
|
|
while (@details) { |
192
|
|
|
|
|
|
|
my $name = shift @names; |
193
|
|
|
|
|
|
|
push @named_details, ( |
194
|
|
|
|
|
|
|
$name |
195
|
|
|
|
|
|
|
? "error detail '".($name)."'" |
196
|
|
|
|
|
|
|
: "(unknown error detail)" |
197
|
|
|
|
|
|
|
); |
198
|
|
|
|
|
|
|
push @named_details, shift @details; |
199
|
|
|
|
|
|
|
} |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
else { |
202
|
|
|
|
|
|
|
@names = reverse @names; |
203
|
|
|
|
|
|
|
@details = reverse @details; |
204
|
|
|
|
|
|
|
while (@details) { |
205
|
|
|
|
|
|
|
push @named_details, "value of '".(shift @details)."'"; |
206
|
|
|
|
|
|
|
push @named_details, shift @details; |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
@named_details; |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
1; |