Improve error handling

This commit is contained in:
2024-03-01 19:21:28 +01:00
parent 9d3f6d9ddd
commit 1255db21ab
2 changed files with 13 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class Message implements JsonSerializable
if (!$json || empty($json['msg'])) {
throw new MessageException("Invalid data");
}
return new Message($json['msg'], $json['data'], $json['uuid']);
return new Message($json['msg'], $json['data'], $json['uuid']??"");
}
public function asResult($result): Message