Skip to content

fix(pwdreset): password reset remove leading whitespace

Peter Bolha requested to merge xbolha/STR-1368/pwd_reset_formatting into main

Description

Partially solves the issue where the password reset for the Lifescience instance contained an error message with minor formatting problems. This request partially solves the issue (leading whitespace in the error message). It turned out that the leading whitespace was a universal problem affecting multiple instances and error messages since the backend error from the password form was parsed based on the colon separating the error identifier and the error message, which could have resulted in preceding whitespace for errors such as: Error (error_id): Specific error message. This was not usually noticeable since the other error messages fit into a single line and the leading whitespace was not so visible.

How to test

  • run the pwd reset page locally using the command: ng serve password-reset
  • visit the local page and type a weak password into the Password field (e.g. a single character)
  • observe the error message for leading whitespace (for example by copying/highlighting)

Author's checklist

  • I have followed the contribution guidelines
  • This MR has been tested or does not change functionality
  • I have added relevant merge request dependencies (if this MR has any)
  • I have added the correct labels
  • I have assigned reviewers (if any are relevant)
  • I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation
  • I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)

Reviewer's checklist

  • This MR has been tested or does not change functionality
  • This MR has correct commit message format

Other information

This could have been solved by a more precise parsing of the error message, but I was not entirely sure whether all the possible error messages have the exact same format with space after the colon, so it seemed safer to trim the excess space after splitting the text.

Related issues

re STR-1368

Merge request reports