- Issue created by @sagar ramgade
Would it be better or worse to catch the Drupal\Core\Entity\Exception\UndefinedLinkTemplateException? I think this approach would work and I'll see if I can test since I happen to have this issue on my site.
When a canonical path is not defined for an entity type, it gives 500 error:
Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'canonical' found for the 'image_style' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 211 of /code/web/core/lib/Drupal/Core/Entity/EntityBase.php).
Try to send path of an image style /router/translate-path?_format=json&path=%2Fsites%2Fdefault%2Ffiles%2Fstyles%2Fsmall%2Fpublic%2Fprofiles%xyz.jpg
Check if the entity has canonical path and log the call.
Active
2.0
Code
Would it be better or worse to catch the Drupal\Core\Entity\Exception\UndefinedLinkTemplateException? I think this approach would work and I'll see if I can test since I happen to have this issue on my site.