Class AppianError

java.lang.Object
com.appiancorp.exceptions.AppianError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AppianResponseError

@GwtCompatible public class AppianError extends Object implements Serializable
This class holds information about an error. The text held in this class is expected to be localized.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getCode

      public String getCode()
      Returns the unique code identifying the error.
    • getTitle

      public String getTitle()
      Returns the error title.
    • getMessage

      public String getMessage()
      Returns the error message suitable for end users.
    • getDetails

      public String getDetails()
      Returns detailed information about the error (for example, metadata such as ids/uuids). This information is meant for designers or administrators.
    • getCause

      public AppianError getCause()
      Returns the lower-level error that caused this error. Returns null if this error is the root error.
    • getMessageWithCode

      public String getMessageWithCode()
      Returns the error message concatenated with the error code.
    • getData

      public Object getData()
      Returns any further data required to successfully process the error.
    • getOriginalMessageWithErrorCode

      public String getOriginalMessageWithErrorCode()
      Returns the original error message and error code if the exception was wrapped.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • collapseToNull

      public static <T extends Iterable<AppianError>> T collapseToNull(T errors)
      If the given collection is null, or empty, or contains only null items, returns null. Otherwise, returns the original collection unchanged.
    • equalDataCheck

      public static com.google.common.base.Equivalence<AppianError> equalDataCheck()
      Returns an Equivalence that compares all fields of AppianError.