Class HttpError

  • All Implemented Interfaces:
    Serializable

    public class HttpError
    extends Object
    implements Serializable
    An error occurred while processing a request. Source - https://www.baeldung.com/rest-api-error-handling-best-practices.
    See Also:
    Serialized Form
    • Constructor Detail

      • HttpError

        public HttpError()
    • Method Detail

      • errorCode

        public HttpError errorCode​(String errorCode)
        errorCode.
        Returns:
        HttpError
      • getErrorCode

        public String getErrorCode()
        A granular, human and computer readable code indicating more deeply what error occurred..
        Returns:
        errorCode
      • setErrorCode

        public void setErrorCode​(String errorCode)
        setErrorCode.
      • message

        public HttpError message​(String message)
        message.
        Returns:
        HttpError
      • getMessage

        public String getMessage()
        A human-readable description of the error, meant for developers to store for their review..
        Returns:
        message
      • setMessage

        public void setMessage​(String message)
        setMessage.
      • equals

        public boolean equals​(Object o)
        Compares objects.
        Overrides:
        equals in class Object
        Returns:
        true or false depending on comparison result.
      • hashCode

        public int hashCode()
        Returns the HashCode.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Converts the given object to string.
        Overrides:
        toString in class Object