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

No error information appears in the logs when Data Provider doesn't use proxy and the portal can't connect to the data provider REST endpoint

    Details

      Description

      No error information is displayed when using a broken data provider. For the business impact, a customer might not be aware that they made a mistake or that something broken. This creates a poor user experience.

      One alternative would be to show the stacktrace on the logs:

      jodd.http.HttpException: Can't connect to: http://localhost:9999/; <--- java.net.ConnectException: Connection refused: connect
      

      Steps to reproduce

      1. Add a deliberately broken data provider:
        1. name: Broken data provider 
        2. URL: http://localhost:9999/
        3. Inputs: n/a
        4. Outputs: Name, $..name, List
      2. Create a form:
        1. Name: Test form 
        2. Field Properties: 
        3. Type: Select from List 
        4. Name: Test 
        5. From Data Provider: Broken data provider 
        6. Choose an output parameter: Name
      3. Save
      4. Publish the form
      5. Open the form

      Expected Behaviour

      Portal admin should be informed that there is an issue with the data provider

      Actual Behaviour

      Nothing is reported. No error is logged to indicate the data provider is not working.

      Increasing the log levels of classes com.liferay.dynamic.data.mapping.data.provider.internal.DDMDataProviderInvokerImpl to WARN
      and com.liferay.dynamic.data.mapping.form.field.type.internal.DDMFormFieldOptionsFactoryImpl to DEBUG has no effect.

      master @ 07cf1bc4eb8dca1508a4f36d2ee5a0cef788c9c8
      7.2.x @ 6eaecf2e61368116b25d3c678b286cfbd26aa4dc
      7.1.x @ 19a1be908eb1a8464b75dd0ee0e585e05aaad537

      Note: in master and 7.2.x, a NPE is logged when executing that use case, but it isn't informative either.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                39 weeks ago

                Packages

                Version Package
                7.1.10 DXP FP14
                7.1.X
                7.2.10 DXP FP2
                7.2.10.1 DXP SP1
                7.2.X
                7.2.1 CE GA2
                Master