Record in the logs the contents of any Invalid JSON messages
This commit is contained in:
parent
1cbab6df2a
commit
b69220b1ce
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user