Uploaded image for project: 'Magnolia Javascript Models'
  1. Magnolia Javascript Models
  2. JSMODELS-22

JavascriptRenderingModel hides ScriptException message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 1.1.2
    • 1.1.1
    • magnolia cloud 5.7.2

    Description

      If a Javascript model creation fails with a ScriptException, the ScriptException messages is not logged.

      The message logged looks like

      RenderException: java.lang.UnsupportedOperationException: Javascript model could not be created. Please check your logs to find out why.

      But there are no messages in the logs that would allow to find the reason.

      The line 72 should be changed from

      log.warn("Error occurred during evaluation of the script (script path: [{}])", JavascriptObjectFactory.resolvePath(definition), e.getMessage()); 
      

      to

      log.warn("Error occurred during evaluation of the script (script path: [{}]): {}", JavascriptObjectFactory.resolvePath(definition), e.getMessage()); 
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgrilli Federico Grilli
              azavodnik Andrey Zavodnik
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD