CC: | 10038752 [...] ticket.noris.net |
Subject: | unsupported error: "Too many requests" |
When evaluating your module this morning, I often got an error number
257, which, however, could not always be reproduced upon retries.
I then repeatedly made the same request until the error reappeared and
found out that there seems to be a new error state that the module is
not yet aware of.
You'll find a diff between a valid response and one that caused the
error mentioned above attached as well as a patch which introduces this
as new error number 19.
Regards,
fany
Subject: | BTVV-busy.patch |
--- Business-Tax-VAT-Validation-0.20/lib/Business/Tax/VAT/Validation.pm 2008-08-18 15:19:26.000000000 +0200
+++ Business-Tax-VAT-Validation-0.21/lib/Business/Tax/VAT/Validation.pm 2009-08-04 10:54:36.917192178 +0200
@@ -19,6 +19,8 @@
############################################################################
# Revision history (dd/mm/yyyy) : #
# #
+# 0.21 04/08/2009; new error status 19: EU database too busy #
+# (Martin H. Sluka) #
# 0.20 18/08/2008; VIES HTML changes: now allowing multiples spaces #
# (Thanks to Simon Williams, Benoît Galy & Raluca Boboia) #
# 0.19 29/04/2008; HU regexp: missing digit "9" added #
@@ -68,7 +70,7 @@
use strict;
BEGIN {
- $Business::Tax::VAT::Validation::VERSION = "0.20";
+ $Business::Tax::VAT::Validation::VERSION = '0.21';
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
}
@@ -295,6 +297,9 @@
18 Member Sevice Unavailable: The EU database is unable to reach the requested member's database.
=item *
+ 19 The EU database is too busy.
+
+=item *
257 Invalid response, please contact the author of this module. : This normally only happens if this software doesn't recognize any valid pattern into the response document: this generally means that the database interface has been modified, and you'll make the author happy by submitting the returned response !!!
=back
@@ -345,6 +350,8 @@
return $self->_set_error(17, "Time out connecting to the database")
} elsif (/^\s*Member State service unavailable/) {
return $self->_set_error(18, "Member State service unavailable: Please re-submit your request later.")
+ } elsif (/^\s*(System busy: Too many requests)\. (Please re-submit your request later\.)/) {
+ return $self->_set_error(19, "$1: $2")
}
return 1 if /^\s*Yes\, valid VAT number\s*$/;
}
@@ -388,6 +395,9 @@
=over 4
=item *
+Martin H. Sluka, noris network AG, Germany.
+
+=item *
Simon Williams, UK2 Limited, United Kingdom & Benoît Galy, Greenacres, France & Raluca Boboia, Evozon, Romania
=item *
Subject: | request.diff |
--- Business::Tax::VAT::Validation.1.OK 2009-08-04 10:09:22.940480830 +0200
+++ Business::Tax::VAT::Validation.4.257 2009-08-04 10:09:26.861239323 +0200
@@ -1,10 +1,10 @@
HTTP/1.1 200 OK
Connection: close
-Date: Tue, 04 Aug 2009 08:09:22 GMT
+Date: Tue, 04 Aug 2009 08:09:26 GMT
Server: WebLogic Server 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973
Content-Type: text/html; charset=UTF-8
-Client-Date: Tue, 04 Aug 2009 08:09:22 GMT
-Client-Peer: 147.67.136.3:80
+Client-Date: Tue, 04 Aug 2009 08:09:26 GMT
+Client-Peer: 147.67.119.103:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Link: <stylesheets/commission.css>; rel="stylesheet"; type="text/css"
@@ -15,7 +15,7 @@
Link: <stylesheets/TAXUD.remrec.css>; rel="stylesheet"; type="text/css"
Link: <stylesheets/TAXUD.print.css>; media="print"; rel="stylesheet"; type="text/css"
Link: <stylesheets/vies.css>; rel="stylesheet"; type="text/css"
-Set-Cookie: JSESSIONID=K3sytmQrxrNvXmtLhqkqVwK01ddvK05mynCDpL5PdyL9v0pmn6g9!1274426319; path=/
+Set-Cookie: JSESSIONID=K3s2FYgTBTYDKWgQW1vCqH5bDByTf2RhDl2QndJ1tRy1216vn2rs!1274426319; path=/
Title: EUROPA site - Validation
X-Meta-Classification: 19
X-Meta-Creator: Taxation and Customs Union
@@ -353,13 +353,14 @@
<h1>VAT Validation Response</h1>
-<table align="center" width="85%" class="vat answer">
- <tr>
- <td>
- Yes, valid VAT number
- </td>
- </tr>
-</table>
+ <table align="center" width="85%" class="vat error">
+ <tr>
+ <td>
+ System busy: Too many requests. Please re-submit your request later.
+
+ </td>
+ </tr>
+ </table>
<br>
@@ -404,7 +405,7 @@
</td>
<td>
<font face="Verdana" size="2">
- ---
+
</font>
</td>
<td> </td>
@@ -423,7 +424,7 @@
</td>
<td>
<font face="Verdana" size="2">
- ---
+
</font>
</td>
<td> </td>