From 80caefcf3badb7c10c5cdf8df43cbe5c2b7bb211 Mon Sep 17 00:00:00 2001 From: m1n0 Date: Thu, 10 Nov 2016 13:02:48 +0100 Subject: [PATCH] Fix resourceNotFoundResponse missing errir bag. --- src/Serializer/JsonApiResponseTrait.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Serializer/JsonApiResponseTrait.php b/src/Serializer/JsonApiResponseTrait.php index cf2ca7b..9b06692 100644 --- a/src/Serializer/JsonApiResponseTrait.php +++ b/src/Serializer/JsonApiResponseTrait.php @@ -67,7 +67,9 @@ protected function resourceDeletedResponse($json) */ protected function resourceNotFoundResponse($json) { - return $this->createResponse(new ResourceNotFound($json)); + $error = new Error('Resource not Found', json_decode($json)); + + return $this->createResponse(new ResourceNotFound(new ErrorBag([$error]))); } /**