mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Fix response when route not found
This commit is contained in:
parent
33ca5784a0
commit
de841ff3f2
1 changed files with 7 additions and 1 deletions
|
|
@ -183,7 +183,13 @@ final class ApiPlatformClient implements ApiClientInterface
|
|||
$this->getToken(),
|
||||
);
|
||||
|
||||
$this->request->setContent(json_decode($response->getContent(), true));
|
||||
try {
|
||||
$content = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
} catch (\Exception ) {
|
||||
$content = [];
|
||||
}
|
||||
|
||||
$this->request->setContent($content);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue