From 3c98c59d51072a05011b19064a2d0032b34f1ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kocsis=20M=C3=A1t=C3=A9?= Date: Wed, 19 Aug 2015 21:39:38 +0200 Subject: [PATCH] Original response can also be sent with the error message --- src/Utils/JsonApiMessageValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/JsonApiMessageValidator.php b/src/Utils/JsonApiMessageValidator.php index 8aeb938..d984399 100644 --- a/src/Utils/JsonApiMessageValidator.php +++ b/src/Utils/JsonApiMessageValidator.php @@ -162,7 +162,7 @@ protected function getValidationErrorDocument(MessageInterface $message, array $ { $errorDocument = $this->getErrorDocument($errors); if ($this->includeOriginalMessage) { - $errorDocument->setMeta(["original" => $message->getBody()]); + $errorDocument->setMeta(["original" => json_decode($message->getBody(), true)]); } return $errorDocument;