Tabnine Logo
RestLiServiceException.setErrorDetails
Code IndexAdd Tabnine to your IDE (free)

How to use
setErrorDetails
method
in
com.linkedin.restli.server.RestLiServiceException

Best Java code snippets using com.linkedin.restli.server.RestLiServiceException.setErrorDetails (Showing top 5 results out of 315)

origin: apache/incubator-gobblin

 exception.setErrorDetails(new DataMap(ImmutableMap.of(LOCATION_301, leaderUri.toString())));
 throw exception;
} else {
origin: com.linkedin.pegasus/restli-int-test-server

@Override
public Greeting get(Long key)
{
 try
 {
  String s = (new String[0])[42];
 }
 catch (ArrayIndexOutOfBoundsException e)
 {
  Greeting details = new Greeting().setMessage("Hello, Sorry for the mess");
  throw new RestLiServiceException(HttpStatus.S_500_INTERNAL_SERVER_ERROR, "error processing request", e)
      .setServiceErrorCode(42).setErrorDetails(details.data());
 }
 return null;
}
origin: org.apache.gobblin/gobblin-throttling-service-server

 exception.setErrorDetails(new DataMap(ImmutableMap.of(LOCATION_301, leaderUri.toString())));
 throw exception;
} else {
origin: com.linkedin.gobblin/gobblin-throttling-service-server

 exception.setErrorDetails(new DataMap(ImmutableMap.of(LOCATION_301, leaderUri.toString())));
 throw exception;
} else {
origin: com.linkedin.pegasus/restli-int-test-server

/**
 * Responds with an error for requests to create insulting greetings, responds
 * with 201 created for all other requests.
 */
@RestMethod.Create
public CreateResponse create(Greeting g)
{
 if(g.hasTone() && g.getTone() == Tone.INSULTING)
 {
  RestLiServiceException notAcceptableException = new RestLiServiceException(HttpStatus.S_406_NOT_ACCEPTABLE,
                                    "I will not tolerate your insolence!");
  DataMap details = new DataMap();
  details.put("reason", "insultingGreeting");
  notAcceptableException.setErrorDetails(details);
  notAcceptableException.setServiceErrorCode(999);
  throw notAcceptableException;
 }
 else
 {
  return new CreateResponse(g.getId(), HttpStatus.S_201_CREATED);
 }
}
com.linkedin.restli.serverRestLiServiceExceptionsetErrorDetails

Popular methods of RestLiServiceException

  • <init>
  • getStatus
  • getErrorDetails
  • getMessage
  • hasErrorDetails
  • fromThrowable
  • getLocalizedMessage
  • getOverridingFormat
  • getServiceErrorCode
  • hasOverridingErrorResponseFormat
    Returns whether this exception has an overriding error format.
  • hasServiceErrorCode
  • printStackTrace
  • hasServiceErrorCode,
  • printStackTrace,
  • setServiceErrorCode

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now