summaryrefslogtreecommitdiff
path: root/FS/FS/part_export/saisei.pm
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:45:26 -0500
commita415347b25229ac13fa84ed8b8e5f2f5ee14205f (patch)
treeeab1ba0a4d209f53be629a69b06c896dbc689d52 /FS/FS/part_export/saisei.pm
parentbc37eb128d35f1f458e78efa88c5c002e9de5490 (diff)
RT# 78356 - cleaned up error message display
Diffstat (limited to 'FS/FS/part_export/saisei.pm')
-rw-r--r--FS/FS/part_export/saisei.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm
index 3ecef6e..db42f61 100644
--- a/FS/FS/part_export/saisei.pm
+++ b/FS/FS/part_export/saisei.pm
@@ -360,7 +360,7 @@ sub export_tower_sector {
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;
}