We are sorry, an error has occured while handling your request.

While trying to {{service}}, an error was encountered: {{error}}

You can try to:
{% if urlname %}

or
{% endif %}