It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to use @ControllerAdvice for Jira Plugin Development?

I am developing the Jira plugin using Atlassian SDK

I want to create the controller advice to handle exception, but is is not working. How can I make the controller advice work? Here is my source code

import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

public class ServiceErrorAdvice {

  public ResponseEntity<String> handleRunTimeException(ServiceException e) {
    return error(INTERNAL_SERVER_ERROR, e);

  private ResponseEntity<String> error(HttpStatus status, Exception e) {
    return ResponseEntity.status(status).body(e.getMessage());


1 answer

0 votes

Hi @thien dinh ngoc ,

Welcome to the Atlassian Community!


Please notice that this is not the best place to get help on apps/add-on development  related questions. 

In case you won't manage any answer in here, you might want to refer to the resources listed in 




Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you