Strange macro rendering error - debug help

I’ve got a macro which, when I insert it on a new page, renders without errors. Two other users get notifications that a new page is created.
User 1 gets en email with the following:

Thereafter User 2 gets an email with a correct rendered macro:

Any idea how I can debug this or what the underlying cause might be?
When I visit the page in Confluence, I don’t see an error.