How to deal with 'internal:' in your link->uri?
just kidding. To help future devs with this issue, check the logs *duh and you'll see this:


  PHP message: Uncaught PHP Exception InvalidArgumentException: "The URI '' is invalid.


So, check for the uri value first!

$node-&gt;my_field-&gt;uri ? Url::fromUri($node-&gt;my_field-&gt;uri)-&gt;toString() : null,