We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd03004 + f4be126 commit 4e62857Copy full SHA for 4e62857
1 file changed
Classes/Domain/Model/ResourceProxy.php
@@ -11,7 +11,7 @@
11
*/
12
13
use GuzzleHttp\Psr7\Uri;
14
-use Neos\Flow\Annotations as Flow;
+use JsonSchema\Exception\RuntimeException;
15
use Netlogix\JsonApiOrg\Consumer\Service\ConsumerBackendInterface;
16
17
class ResourceProxy implements \ArrayAccess
@@ -92,6 +92,12 @@ public function getJsonApiOrgResourceIdentifier()
92
93
protected function loadRelationship(string $propertyName)
94
{
95
+ if (!array_key_exists('relationships', $this->payload)) {
96
+ $typeName = $this->type->getTypeName();
97
+ throw new RuntimeException(
98
+ "relationships['$propertyName'] could not be loaded for $typeName. payload['relationships'] is not defined.",
99
+ 1723619674);
100
+ }
101
if (array_key_exists('data', $this->payload['relationships'][$propertyName])) {
102
return;
103
}
0 commit comments