Hi
I have created Script Runner Rest End point.
For the success case, I am sending ok response with JSON as shown below
return Response.ok(new JsonBuilder([success: success]).toString()).build();
For the failure case, I want to send not.ok response. May be 404 status code with JSON error message.
Can anyone please tell how to do it? Is there any method for that?