- Issue created by @prakash3108
- Issue was unassigned.
- 🇬🇧United Kingdom dahousecat
$context['resource_type']
is set inentity_share/modules/entity_share_client/src/Service/JsonapiHelper.php
from the return value ofResourceTypeRepository->getByTypeName()
This will return null if a resource type is not found with that name.
Just showing the user which name returned null, and possibly a list of valid names, would go a long way to helping debug what the underlying issue is.
E.g.
if (!$resourceType instanceof ResourceType) { $allTypes = $this->resourceTypeRepository->all(); $args = [$data['type'], implode(', ', array_keys($allTypes))]; throw new \InvalidArgumentException(vsprintf('ResourceType with name %s not found. Valid names are: %s', $args)); }
After I added this code when when syncing entities that fail I now get an error like:
ResourceType with name node--region not found. Valid names are: batch_plugin_entity--batch_plugin_entity, block--block...