added error messages on invalid incoming communication messages
This commit is contained in:
parent
f91d93ba2a
commit
650afc500a
@ -266,8 +266,10 @@ class CommunicationManager implements CallbackListener, UsageInformationAble {
|
|||||||
$data = json_decode($data);
|
$data = json_decode($data);
|
||||||
|
|
||||||
if ($data == null) {
|
if ($data == null) {
|
||||||
$data = array("error" => true, "data" => "Data is not provided as an valid AES-196-encrypted encrypted JSON");
|
Logger::log("[CommunicationManager] Error: Data is not provided as an valid AES-196 encrypted JSON");
|
||||||
|
$data = array("error" => true, "data" => "Data is not provided as an valid AES-196 encrypted JSON");
|
||||||
} else if (!property_exists($data, "method") || !property_exists($data, "data")) {
|
} else if (!property_exists($data, "method") || !property_exists($data, "data")) {
|
||||||
|
Logger::log("[CommunicationManager] Invalid Communication Message Received");
|
||||||
$data = array("error" => true, "data" => "Invalid Message");
|
$data = array("error" => true, "data" => "Invalid Message");
|
||||||
} else {
|
} else {
|
||||||
$answer = $this->triggerCommuncationCallback($data->method, $data->data);
|
$answer = $this->triggerCommuncationCallback($data->method, $data->data);
|
||||||
|
Loading…
Reference in New Issue
Block a user