congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RestLiServiceException.hasErrorDetails
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using com.linkedin.restli.server.RestLiServiceException.hasErrorDetails (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

if (errorResponseFormat.showDetails() && result.hasErrorDetails())
com.linkedin.restli.serverRestLiServiceExceptionhasErrorDetails

Popular methods of RestLiServiceException

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Runner (org.openjdk.jmh.runner)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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