Class Exception

java.lang.Object
com.genologics.ri.exception.Exception
All Implemented Interfaces:
Serializable

public class Exception extends Object implements Serializable
Exception is a descriptive error message that is returned instead of the standard response for any request that the system was unable to process.

Exception will include a code corresponding to the HTTP response code of the error. Typical response codes are 400, indicating that the submitted request was not valid and cannot be reattempted without corrective action being taken, or 500 indicating that there was an internal error in the server when attempting to process the request. Refer to the section on HTTP response codes in the API reference documentation for further details about the categories and meanings of HTTP response codes.

Exception will include a message element with a textual summary of the error, and may also provide a suggested-actions element with details on how to correct the problem.

See Also:
  • Field Details

    • message

      protected String message
      A textual summary of the error that occurred.
    • suggestedActions

      protected String suggestedActions
      Details on how to correct the problem that caused the exception.
    • category

      protected String category
      The category of the exception.
    • code

      protected String code
      The HTTP response code corresponding to the error (e.g., 400 for bad request, 500 for internal server error).
  • Constructor Details

    • Exception

      public Exception()
      Creates a new Exception instance.
  • Method Details

    • getMessage

      public String getMessage()
      Gets the error message.
      Returns:
      The textual summary of the error.
    • setMessage

      public void setMessage(String message)
      Sets the error message.
      Parameters:
      message - The textual summary of the error to set.
    • getSuggestedActions

      public String getSuggestedActions()
      Gets the suggested actions to correct the error.
      Returns:
      Details on how to correct the problem, or null if not provided.
    • setSuggestedActions

      public void setSuggestedActions(String suggestedActions)
      Sets the suggested actions to correct the error.
      Parameters:
      suggestedActions - Details on how to correct the problem.
    • getCategory

      public String getCategory()
      Gets the category of the exception.
      Returns:
      The exception category.
    • setCategory

      public void setCategory(String category)
      Sets the category of the exception.
      Parameters:
      category - The exception category to set.
    • getCode

      public String getCode()
      Gets the HTTP response code of the error.
      Returns:
      The HTTP response code (e.g., "400", "500").
    • setCode

      public void setCode(String code)
      Sets the HTTP response code of the error.
      Parameters:
      code - The HTTP response code to set.