mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 05:09:08 +00:00
Fix parsing server error message. Add 'sending' and 'running' suffixes to service names.
This commit is contained in:
@@ -6788,7 +6788,7 @@ sub run_service {
|
||||
# Load the Service object from local service JSON file.
|
||||
# $service changes from a string scalar to a Service object.
|
||||
$service = load_service(
|
||||
service => $service,
|
||||
service => "$service running",
|
||||
lib_dir => $lib_dir,
|
||||
);
|
||||
|
||||
@@ -7209,7 +7209,7 @@ sub send_data {
|
||||
# Load the Service object from local service JSON file.
|
||||
# $service changes from a string scalar to a Service object.
|
||||
$service = load_service(
|
||||
service => $service,
|
||||
service => "$service sending",
|
||||
lib_dir => $lib_dir,
|
||||
);
|
||||
|
||||
@@ -7246,8 +7246,8 @@ sub send_data {
|
||||
my $error_msg;
|
||||
my $content = $client->response->content;
|
||||
if ( $content ) {
|
||||
my $error_hashref = decode_json($content);
|
||||
$error_msg = $error_hashref->{error};
|
||||
my $errors = decode_json($content);
|
||||
$error_msg = join("\n", @$errors);
|
||||
}
|
||||
$logger->warning('Error ' . $e->status . " sending $data_file: "
|
||||
. ($error_msg || '(No error message from server)'));
|
||||
|
Reference in New Issue
Block a user