guacamole-client icon indicating copy to clipboard operation
guacamole-client copied to clipboard

GUACAMOLE-1948: Provide a comprehensive error message for input exceeding database column.

Open aleitner opened this issue 1 year ago • 0 comments

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 validateParameters within the ConnectionService class. 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 a TranslatableGuacamoleClientOverrunException with a clear and specific message.

  • Added new error key CONNECTION_PARAMETERS.DATABASE_PARAMETER_VALUE_TOO_LONG to the JSON file of translatable messages.

Screenshot_20240502_232540

aleitner avatar May 03 '24 03:05 aleitner