projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a9056b1
)
RT# 78356 - cleaned up error message display
author
Christopher Burger
<burgerc@freeside.biz>
Tue, 29 Jan 2019 22:43:25 +0000
(17:43 -0500)
committer
Christopher Burger
<burgerc@freeside.biz>
Tue, 29 Jan 2019 22:43:25 +0000
(17:43 -0500)
FS/FS/part_export/saisei.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/saisei.pm
b/FS/FS/part_export/saisei.pm
index
f409046
..
db42f61
100644
(file)
--- 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
};
'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 $sector_access_point if $sector_access_point->{error};
}
- return
$self->api_error
;
+ return
{ error => $self->api_error, }
;
}
## creates the rateplan name
}
## creates the rateplan name
@@
-537,7
+537,7
@@
sub api_get_host {
my $get_host = $self->api_call("GET", "/hosts/$ip");
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;
}
return $get_host;
}
@@
-819,6
+819,7
@@
sub process_tower {
my $accesspoint = $self->api_get_accesspoint($tower_name);
my $accesspoint = $self->api_get_accesspoint($tower_name);
+ return { error => $self->api_error, } if $self->api_error;
return $accesspoint;
}
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);
# 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;
}
return $accesspoint;
}