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

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

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

origin: azkaban/azkaban

/**
 * Test that an error message is attached to the exception on an error
 */
@Test
public void testErrorMessageDeploy() {
 final ProjectManagerResource resource = new ProjectManagerResource();
 final Map<String, ValidationReport> reports = new LinkedHashMap<>();
 addMockError(reports, "This should show up.");
 // We expect that a RestLiServiceException is thrown given a
 // report with errors. Uncaught exceptions will result in failure
 try {
  resource.checkReports(reports);
  Assert.fail();
 } catch (final RestLiServiceException e) {
  //Ensure we have the right status code and exit
  assertEquals(e.getStatus(), HttpStatus.S_400_BAD_REQUEST);
  assertEquals(e.getMessage(), "Validator Error reports errors: This should show up."
    + System.getProperty("line.separator"));
 }
}
origin: com.linkedin.pegasus/restli-server

if (errorResponseFormat.showMessage() && result.getMessage() != null)
 er.setMessage(result.getMessage());
com.linkedin.restli.serverRestLiServiceExceptiongetMessage

Popular methods of RestLiServiceException

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Path (java.nio.file)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Top plugins for WebStorm
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