Skip to content

Commit

Permalink
Handle Json validation errors (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 3, 2023
1 parent 93d7252 commit 74fdfd4
Show file tree
Hide file tree
Showing 3 changed files with 361 additions and 69 deletions.
4 changes: 4 additions & 0 deletions src/API/LocalApi.php
Expand Up @@ -1321,6 +1321,9 @@ private function decodePayload(string $data): Entities\API\DeviceRawMessage|null
'message' => [
'command' => $command->getValue(),
'payload' => $payload,
'schema' => $command->equalsValue(
Types\LocalDeviceCommand::CMD_STATUS,
) ? self::WIFI_QUERY_MESSAGE_SCHEMA_FILENAME : self::DP_QUERY_MESSAGE_SCHEMA_FILENAME,
],
],
);
Expand Down Expand Up @@ -1367,6 +1370,7 @@ private function decodePayload(string $data): Entities\API\DeviceRawMessage|null
'message' => [
'command' => $command->getValue(),
'payload' => $payload,
'schema' => self::WIFI_QUERY_MESSAGE_SCHEMA_FILENAME,
],
],
);
Expand Down

0 comments on commit 74fdfd4

Please sign in to comment.