diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-12-20 18:25:09 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-12-20 18:25:09 -0800 |
| commit | 63075e170262a1aebd7acd3a1d2a1ef06a84fce9 (patch) | |
| tree | 9774d591c233d18ddb78a56b5c7842fd478a9aeb /FS | |
| parent | 96bb37b68d74110d2875e011baa955d7c55dc892 (diff) | |
fix state selection w/voip innovations API, add better error logging, RT#15150
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/part_export/globalpops_voip.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/FS/FS/part_export/globalpops_voip.pm b/FS/FS/part_export/globalpops_voip.pm index 6df21f406..fd2e93c0f 100644 --- a/FS/FS/part_export/globalpops_voip.pm +++ b/FS/FS/part_export/globalpops_voip.pm @@ -5,6 +5,7 @@ use Tie::IxHash; use FS::Record qw(qsearch dbh); use FS::part_export; use FS::phone_avail; +use Data::Dumper; @ISA = qw(FS::part_export); @@ -73,8 +74,13 @@ sub get_dids { if ( $search->{'statuscode'} == 302200 ) { return []; } elsif ( $search->{'statuscode'} != 100 ) { - my $error = "Error running VoIP Innovations getDIDs: ". - $search->{'statuscode'}. ': '. $search->{'status'}. "\n"; + + my $error = "Error running VoIP Innovations getDIDs: "; + if ( $search->{'statuscode'} || $search->{'status'} ) { + $error .= $search->{'statuscode'}. ': '. $search->{'status'}. "\n"; + } else { + $error .= Dumper($search); + } warn $error; die $error; } |
