[freeside-commits] branch FREESIDE_4_BRANCH updated. 9c036d4afb4f0709e7baf6e94931262a88573701
Ivan
ivan at 420.am
Sun Aug 27 11:31:16 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via 9c036d4afb4f0709e7baf6e94931262a88573701 (commit)
from 4d763e7c7d4c5f2dc9238f9f955a2211056d578c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9c036d4afb4f0709e7baf6e94931262a88573701
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Aug 27 11:31:15 2017 -0700
SureTax: additional debugging, RT#76987
diff --git a/FS/FS/TaxEngine/suretax.pm b/FS/FS/TaxEngine/suretax.pm
index fe8764b..356f5f3 100644
--- a/FS/FS/TaxEngine/suretax.pm
+++ b/FS/FS/TaxEngine/suretax.pm
@@ -347,7 +347,10 @@ sub make_taxlines {
'Accept' => 'application/json',
);
- warn "received SureTax response\n" if $DEBUG;
+ warn 'received SureTax response: '. $http_response->status_line. "\n"
+ if $DEBUG;
+ die $http_response->status_line. "\n" unless $http_response->is_success;
+
my $raw_response = $http_response->content;
warn $raw_response if $DEBUG > 2;
my $response;
@@ -360,7 +363,7 @@ sub make_taxlines {
warn "decoding SureTax response\n" if $DEBUG;
$response = eval { $json->decode($raw_response) }
- or die "$raw_response\n";
+ or die "Can't JSON-decode response: $raw_response\n";
# documentation implies this might be necessary
$response = $response->{'d'} if exists $response->{'d'};
-----------------------------------------------------------------------
Summary of changes:
FS/FS/TaxEngine/suretax.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list