new: [logging] Added verbose logging to the server sync test throwing an unexpected error

pull/4647/head
iglocska 2019-05-16 11:28:51 +02:00
parent 9f7cf9ffca
commit 5ac27f58f1
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 16 additions and 0 deletions

View File

@ -3793,6 +3793,22 @@ class Server extends AppModel
return array('status' => 6);
}
}
$this->Log = ClassRegistry::init('Log');
$this->Log->create();
$this->Log->save(array(
'org' => 'SYSTEM',
'model' => 'Server',
'model_id' => $id,
'email' => 'SYSTEM',
'action' => 'error',
'user_id' => 0,
'title' => 'Error: Connection test failed. Returned data is in the change field.',
'change' => sprintf(
'response () => (%s), response-code () => (%s)',
$response->body,
$response->code
)
));
return array('status' => 3);
}
}