Skip to content

Commit 779ecea

Browse files
author
ppaulis
committed
bugfixes
1 parent cab543d commit 779ecea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Service/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function create($data)
347347
$entity = $this->getHydrator()->hydrate($data, $entity);
348348
return $entity;
349349
}
350-
throw new DomainException($result->message, $this->getLastResponseHttpCode());
350+
throw new DomainException($result && is_object($result) ? $result->message : "Couldn't create the resource.", $this->getLastResponseHttpCode());
351351

352352
}
353353

0 commit comments

Comments
 (0)