GUACAMOLE-1948: Provide a comprehensive error message for input exceeding database column.
Problem
We identified an issue where users were facing a generic error when attempting to save Guacamole connection parameters that exceeded the maximum allowed length (4096 characters). The error message was not clear and did not provide useful feedback regarding the input size constraint on the database column for connection parameters.
Solution
To enhance the user experience and provide a more informative error message, I have implemented the following changes:
-
Added a new method
validateParameterswithin theConnectionServiceclass. This method checks each connection parameter's value against the known maximum size limit before a connection is created or updated. If a parameter value exceeds the maximum allowed length, the method throws aTranslatableGuacamoleClientOverrunExceptionwith a clear and specific message. -
Added new error key
CONNECTION_PARAMETERS.DATABASE_PARAMETER_VALUE_TOO_LONGto the JSON file of translatable messages.