From b69220b1cec157111598c185697b3b5e8c229dfa Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 10 Jun 2022 09:34:09 +1000 Subject: [PATCH] Record in the logs the contents of any Invalid JSON messages --- src/Client/Payload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client/Payload.php b/src/Client/Payload.php index 0ab06a8..4b6eadd 100644 --- a/src/Client/Payload.php +++ b/src/Client/Payload.php @@ -33,7 +33,7 @@ class Payload implements \ArrayAccess, \JsonSerializable $data = json_decode((string)$json,true); if (json_last_error() !== JSON_ERROR_NONE || (! is_array($data))) { - throw new \UnexpectedValueException('Invalid JSON message.'); + throw new \UnexpectedValueException('Invalid JSON message:'.serialize($data)); } return new static($data);