com.vaadin.flow.server.connect.exception.

Class EndpointValidationException

    • Constructor Detail

      • EndpointValidationException

        public EndpointValidationException(EndpointValidationException.ValidationErrorData data)

        Creates a validation exception from the error data.

        Parameters:

        data - validation error data, mandatory (cannot be null)

      • EndpointValidationException

        public EndpointValidationException(List<EndpointValidationException.ValidationErrorData> validationErrorData)

        Creates a validation exception from a error data list.

        Parameters:

        validationErrorData - A list of validation error data, must not be null or empty.

      • EndpointValidationException

        public EndpointValidationException(String message,
                                           List<EndpointValidationException.ValidationErrorData> validationErrorData)

        Creates a validation exception from a error data list.

        Parameters:

        message - General error message.

        validationErrorData - A list of validation error data, must not be null or empty.

    • Method Detail

      • getSerializationData

        public Map<String,Object> getSerializationData()

        Description copied from class: EndpointException

        Creates a map with the serialization data to be sent to the client when the exception thrown is processed by VaadinConnectController. The following data will be sent to the client:

        • exception type: either the original exception type or EndpointException, if no original exception is given
        • message: non-blank message either from the constructor or from the original exception. If both are blank, none provided.
        • detail: detail object serialized to json, if provided in the corresponding constructor

        Overrides:

        getSerializationData in class EndpointException

        Returns:

        the data to be sent to the client