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

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

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

origin: apache/incubator-gobblin

@Test
public void test() throws Exception {
 try(Closer closer = Closer.create()) {
  Map<String, String> configMap = Maps.newHashMap();
  TestingServer zkTestingServer = closer.register(new TestingServer(-1));
  configMap.put(ThrottlingGuiceServletConfig.ZK_STRING_KEY, zkTestingServer.getConnectString());
  configMap.put(ThrottlingGuiceServletConfig.HA_CLUSTER_NAME, TestFailover.class.getSimpleName() + "_cluster");
  Config config = ConfigFactory.parseMap(configMap);
  ThrottlingGuiceServletConfig server2001 = createServerAtPort(config, 2001);
  PermitAllocation allocation = sendRequestToServer(server2001, 10);
  Assert.assertTrue(allocation.getPermits() >= 1);
  ThrottlingGuiceServletConfig server2002 = createServerAtPort(config, 2002);
  allocation = sendRequestToServer(server2001, 10);
  Assert.assertTrue(allocation.getPermits() >= 1);
  try {
   sendRequestToServer(server2002, 10);
   Assert.fail();
  } catch (RestLiServiceException exc) {
   Assert.assertTrue(exc.hasErrorDetails());
   Assert.assertTrue(exc.getErrorDetails().containsKey(LimiterServerResource.LOCATION_301));
   Assert.assertEquals(new URI(exc.getErrorDetails().get(LimiterServerResource.LOCATION_301).toString()).getPort(), 2001);
  }
  server2001.close();
  allocation = sendRequestToServer(server2002, 10);
  Assert.assertTrue(allocation.getPermits() >= 1);
 }
}
origin: com.linkedin.pegasus/restli-server

er.setErrorDetails(new ErrorDetails(result.getErrorDetails()));
com.linkedin.restli.serverRestLiServiceExceptiongetErrorDetails

Popular methods of RestLiServiceException

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

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • String (java.lang)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top PhpStorm plugins
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