I wrote my own Jira Resource .
Either you create a REST Plugin Module or a Web Resource .
But how can I return WorkflowException from my own Web Resource ??
Right now if the user calls my REST Resource and there is an Exception a 500er Error is returned without any useful information for the user being displayed as is normal the case in Jira shown by a popup .
I hope there is way to do this.
P.S.
My Api has to repond the same way as Jira Api normally does when there is a WorkflowException. Maybe there is a flag that could be set