Codota Logo
RestLiServiceException.setErrorDetails
Code IndexAdd Codota 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)

  • Common ways to obtain RestLiServiceException
private void myMethod () {
RestLiServiceException r =
  • Codota IconHttpStatus status;String message;new RestLiServiceException(status, message)
  • Codota IconHttpStatus status;Object[] object;Object[] args;new RestLiServiceException(status, String.format("<changeme>", object, args))
  • Smart code suggestions by Codota
}
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
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • orElseThrow (Optional)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • JLabel (javax.swing)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now