In fact we don’t have the possibility to launch action(s) from the error dialogs.
But it might be a nice addition sometimes indeed, I am thinking for example about a message such as “To continue, you must create a period for the date …” or other messages of this kind where we know that something is missing or not correctly configured.
So maybe we could add actions on UserError and represent them as buttons, it could provide hints for the users to know what to do next to achieve its goal.