Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Serializer/JsonApiResponseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function resourcePatchErrorResponse($json)
{
$error = new Error('Unprocessable Entity', json_decode($json));

return $this->createResponse(new UnprocessableEntity([$error]));
return $this->createResponse(new UnprocessableEntity(new ErrorBag([$error])));
}

/**
Expand All @@ -93,7 +93,7 @@ protected function resourcePostErrorResponse($json)
{
$error = new Error('Unprocessable Entity', json_decode($json));

return $this->createResponse(new UnprocessableEntity([$error]));
return $this->createResponse(new UnprocessableEntity(new ErrorBag([$error])));
}

/**
Expand Down Expand Up @@ -135,7 +135,7 @@ protected function unsupportedActionResponse($json)
{
$error = new Error('Unsupported Action', json_decode($json));

return $this->createResponse(new UnsupportedAction([$error]));
return $this->createResponse(new UnsupportedAction(new ErrorBag([$error])));
}

/**
Expand Down