Class RESTException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ws.rs.WebApplicationException
com.atlassian.jira.rest.v2.issue.RESTException
All Implemented Interfaces:
Serializable

public class RESTException extends javax.ws.rs.WebApplicationException
Since:
v4.2
See Also:
  • Constructor Details

    • RESTException

      public RESTException()
      Creates a new RESTException for the given issue. Whenever possible it is preferable to use RESTException(javax.ws.rs.core.Response.Status, com.atlassian.jira.rest.api.util.ErrorCollection) constructor, passing a collection of errors and the status
    • RESTException

      public RESTException(ErrorCollection errors)
      Creates a new RESTException for the given issue, with a collection of errors. The HTTP status is derived from the ErrorCollection.
      Parameters:
      errors - an ErrorCollection containing the errors
    • RESTException

      public RESTException(javax.ws.rs.core.Response.Status status, String... errorMessages)
    • RESTException

      public RESTException(javax.ws.rs.core.Response.Status status, ErrorCollection errors)
      Creates a new RESTException for the given issue, with a collection of errors.
      Parameters:
      status - the HTTP status of this error (401, 403, etc)
      errors - an ErrorCollection containing the errors
    • RESTException

      public RESTException(javax.ws.rs.core.Response.Status status, Throwable cause)
      Creates a new RESTException for the given issue and allows to nest an exception.
      Parameters:
      status - the HTTP status of this error (401, 403, etc)
      cause - the nested exception that will be logged by the ExceptionInterceptor, before returning the response to the user.
  • Method Details