summaryrefslogtreecommitdiff
path: root/FS/FS/part_export
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-01-29 17:43:25 -0500
committerChristopher Burger <burgerc@freeside.biz>2019-01-29 17:43:25 -0500
commit6702f62122aeca25cedd635914a9bd9d1d5a35eb (patch)
tree92dbb6feb649c089b433d958c9fb126bc4d1d792 /FS/FS/part_export
parenta9056b16e215e7ac8da9144106e34918cced951f (diff)
RT# 78356 - cleaned up error message display
Diffstat (limited to 'FS/FS/part_export')
-rw-r--r--FS/FS/part_export/saisei.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm
index f409046..db42f61 100644
--- a/FS/FS/part_export/saisei.pm
+++ b/FS/FS/part_export/saisei.pm
@@ -356,11 +356,11 @@ sub export_tower_sector {
'sector_downrate_limit' => $tower_sector->{Hash}->{down_rate_limit},
'modify_existing' => '1', # modify an existing access point with this info
};
- my $sector_access_point = process_sector($self, $sector_opt);
+ my $sector_access_point = process_sector($self, $sector_opt) unless ($sector_name eq "_default");
return $sector_access_point if $sector_access_point->{error};
}
- return $self->api_error;
+ return { error => $self->api_error, };
}
## creates the rateplan name
@@ -537,7 +537,7 @@ sub api_get_host {
my $get_host = $self->api_call("GET", "/hosts/$ip");
- return $self->api_error if $self->api_error;
+ return { message => $self->api_error, } if $self->api_error;
return $get_host;
}
@@ -819,6 +819,7 @@ sub process_tower {
my $accesspoint = $self->api_get_accesspoint($tower_name);
+ return { error => $self->api_error, } if $self->api_error;
return $accesspoint;
}
@@ -857,6 +858,7 @@ sub process_sector {
# set access point to existing one or newly created one.
my $accesspoint = $existing_sector_ap ? $existing_sector_ap : $self->api_get_accesspoint($sector_name);
+ return { error => $self->api_error, } if $self->api_error;
return $accesspoint;
}