We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cab543d commit 779eceaCopy full SHA for 779ecea
src/Service/Resource.php
@@ -347,7 +347,7 @@ public function create($data)
347
$entity = $this->getHydrator()->hydrate($data, $entity);
348
return $entity;
349
}
350
- throw new DomainException($result->message, $this->getLastResponseHttpCode());
+ throw new DomainException($result && is_object($result) ? $result->message : "Couldn't create the resource.", $this->getLastResponseHttpCode());
351
352
353
0 commit comments