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
So anyone not understanding my problem here some code:
@GET
@Path("/{key}")
@AnonymousAllowed
@Produces({MediaType.MULTIPART_FORM_DATA})
public Response getMessage(@Context HttpServletRequest request, @Context HttpServletResponse response,
@PathParam("key") String issueKey) {
// Here I throw for example a WorkflowException, but this WorkflowException
// will not be shown in Jira client, instead client will get a nonsense page
// saying This page is not reachable
throw new WorkflowException("Just a test!");
return Response.ok().build();
}
See the comment. My goal would be to show the normal Jira Popup, but I really do not know if it is possible.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.