Class Error

java.lang.Object
com.contentstack.sdk.Error

public class Error
extends Object
If there is something wrong with the API request, Contentstack returns an error.
  • Constructor Details

  • Method Details

    • getErrorMessage

      public String getErrorMessage()
      Returns error in string format.
      Returns:
      String error message

      Example :
        String errorString = error.getErrorMessage();
        
    • setErrorMessage

      protected void setErrorMessage​(String errorMessage)
    • getErrorCode

      public int getErrorCode()
      Returns error code
      Returns:
      int value.

      Example :
        int errorCode = error.getErrorCode();
        
    • setErrorCode

      protected void setErrorCode​(int errorCode)
    • getErrorDetail

      public String getErrorDetail()
      Returns error details in String
      Returns:
      String

      Example :
       String error = error.getErrorDetail();
       
    • setErrorDetail

      protected void setErrorDetail​(String errDetails)