REST Exception error

 

We are encountering a RESTException error that has no harm towards end users but blows up our monitoring tool all day - just about every action will spark this error. 

Specs below:

JIRA 6.4.12
Java Version: 1.8.0_51

Here are the details:

Screen Shot 2016-07-15 at 10.46.02 AM.png


 Stack trace:

/* RESTException - Decompiled by JODE

 * Visit http://jode.sourceforge.net/

 */

package com.atlassian.jira.rest.v2.issue;

import javax.ws.rs.WebApplicationException;

import javax.ws.rs.core.Response;




import com.atlassian.jira.rest.api.http.CacheControl;

import com.atlassian.jira.rest.api.util.ErrorCollection;




public class RESTException extends WebApplicationException

{

    private static final Response.Status DEFAULT_STATUS

	= Response.Status.BAD_REQUEST;

    

    public RESTException() {

	this(DEFAULT_STATUS, ErrorCollection.of(new String[0]));

    }

    

    public RESTException(ErrorCollection errors) {

	super(createResponse(errors));

    }

    

    public transient RESTException(Response.Status status,

				   String[] errorMessages) {

	this(status, ErrorCollection.of(errorMessages));

    }

    

    public RESTException(Response.Status status, ErrorCollection errors) {

	super(createResponse(status.getStatusCode(), errors));

    }

    

    public RESTException(Response.Status status, Throwable cause) {

	super(cause, status);

    }

    

    private static Response createResponse(ErrorCollection errors) {

	int statusCode

	    = (errors.getStatus() == null ? DEFAULT_STATUS.getStatusCode()

	       : errors.getStatus().intValue());

	return createResponse(statusCode, errors);

    }

    

    private static Response createResponse(int status,

					   ErrorCollection errors) {

	return Response.status(status).entity(errors).cacheControl

		   (CacheControl.never()).build();

    }

    

    public String toString() {

	return (getLocalizedMessage() != null ? super.toString()

		: (super.toString() + "("

		   + Response.Status.fromStatusCode(getResponse().getStatus())

		   + ")"));

    }

}

1 answer

bump.. please help..

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

240 views 1 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you