summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2012-02-13 05:06:50 +0000
committerivan <ivan>2012-02-13 05:06:50 +0000
commita75d0d61ee8904b4e40198cdf9a170a297656e8d (patch)
treeedce2aab9f7f3f9087d860806b55c761165f23a8 /FS/FS
parent3acaea77e979e4739ede4a93f09d6fbf50f78d7b (diff)
show a VoIP Innovations login error in the log, RT#15150
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/part_export/globalpops_voip.pm21
1 files changed, 13 insertions, 8 deletions
diff --git a/FS/FS/part_export/globalpops_voip.pm b/FS/FS/part_export/globalpops_voip.pm
index b6e713ac9..52a4ec2a1 100644
--- a/FS/FS/part_export/globalpops_voip.pm
+++ b/FS/FS/part_export/globalpops_voip.pm
@@ -60,21 +60,23 @@ sub get_dids {
}
my $dids = $self->gp_command('getDIDs', %getdids);
+
if ( $dids->{'type'} eq 'Error' ) {
- die "Error running VoIP Innovations getDIDs: ".
- $search->{'statuscode'}. ': '. $search->{'status'}; #die??
+ my $error = "Error running VoIP Innovations getDIDs: ".
+ $dids->{'statuscode'}. ': '. $dids->{'status'}. "\n";
+ warn $error;
+ die $error;
}
- #use Data::Dumper;
- #warn Dumper($dids);
-
my $search = $dids->{'search'};
if ( $search->{'statuscode'} == 302200 ) {
return [];
} elsif ( $search->{'statuscode'} != 100 ) {
- die "Error running VoIP Innovations getDIDs: ".
- $search->{'statuscode'}. ': '. $search->{'status'}; #die??
+ my $error = "Error running VoIP Innovations getDIDs: ".
+ $search->{'statuscode'}. ': '. $search->{'status'}. "\n";
+ warn $error;
+ die $error;
}
my @return = ();
@@ -246,7 +248,10 @@ sub gp_command {
my( $self, $command, @args ) = @_;
eval "use Net::GlobalPOPs::MediaServicesAPI;";
- die $@ if $@;
+ if ( $@ ) {
+ warn $@;
+ die $@;
+ }
my $gp = Net::GlobalPOPs::MediaServicesAPI->new(
'login' => $self->option('login'),