Class Error

java.lang.Object
io.domainlifecycles.spring.http.Error

public class Error extends Object
General http response structure for errors.
  • Constructor Details

    • Error

      public Error(String code, String message)
      Creates a new Error instance with the specified error code and message.
      Parameters:
      code - the error code
      message - the error message
    • Error

      public Error()
      Default constructor for the error class.
  • Method Details

    • getCode

      public String getCode()
      Returns the error code
      Returns:
      the error code
    • setCode

      public void setCode(String code)
      Sets the error code.
      Parameters:
      code - the error code to be set
    • getMessage

      public String getMessage()
      Returns:
      the error message
    • setMessage

      public void setMessage(String message)
      Sets the error message.
      Parameters:
      message - the error message to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
      Parameters:
      other - other Object to check
      Returns:
      true, if other is an Error.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object