Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-101278

Update console log pattern for displaying errors in portal-search-tuning module

    Details

      Description

      From https://github.com/brianchandotcom/liferay-portal-ee/pull/26423#discussion_r322099323, we shouldn't be using console.log, but instead possibly console.error.

      A ticket in the frontend-guidelines repo has been opened to discuss an appropriate pattern for displaying messages in the console so we should wait to see what is decided and update accordingly. https://github.com/liferay/liferay-frontend-guidelines/issues/84

      Changes made in this ticket:

      • Added more error boundaries so if certain parts of the react app break, only parts of the app will not appear, rather than the entire page going blank
      • An empty state image with an error message will appear if the entire app breaks (due to a javascript error) "An error has occurred and we were unable to load Result Rankings."
      • If NODE_ENV=development, error messages will be logged to the browser console and a debugger for the form will be displayed to reveal the form values being submitted.

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            kevin.tan Kevin Tan
            Engineering Assignee:
            Olivia Yu
            Recent user:
            Tibor Lipusz
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                7.2.10 DXP FP4
                Master