I’m trying to display error messages to the user from a Method Directive BPM.
In 10.2 I would just use a Raise Exception node in the BPM Designer and it would show the error message to the user. With 2021.1, however, the error shows as undefined and only displays in the server error logs.
I was pleased to find out that you can still publish message boxes from custom code in Kinetic. If you use this code in a custom code block in your BPM, you can imitate an exception. Not sure if it will show up in the server log, but your user will get the message. And it pops up just like the undefined exceptions do.
The preferred method is to send the user a nice message telling them you know about the error and will be working on it. Meanwhile, save the cryptic messages for the logs!
In addition to the book, if you have a PluralSight membership or catch them during one of their free weekends, this is a good course that describes security and logging errors: