Class ErrorMesssage


  • public final class ErrorMesssage
    extends Object
    Error response containing message and code.
    • Constructor Detail

      • ErrorMesssage

        public ErrorMesssage()
    • Method Detail

      • code

        public String code()
        Get the code property: standard error code.
        Returns:
        the code value.
      • withCode

        public ErrorMesssage withCode​(String code)
        Set the code property: standard error code.
        Parameters:
        code - the code value to set.
        Returns:
        the ErrorMesssage object itself.
      • message

        public String message()
        Get the message property: standard error description.
        Returns:
        the message value.
      • withMessage

        public ErrorMesssage withMessage​(String message)
        Set the message property: standard error description.
        Parameters:
        message - the message value to set.
        Returns:
        the ErrorMesssage object itself.
      • details

        public String details()
        Get the details property: detailed summary of error.
        Returns:
        the details value.
      • withDetails

        public ErrorMesssage withDetails​(String details)
        Set the details property: detailed summary of error.
        Parameters:
        details - the details value to set.
        Returns:
        the ErrorMesssage object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.