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

Headless APIs missed value information when fails.

Details

    • 1
    • 3
    • Almost a Sprint, H01S02 - Wrath, H01S01 - Fossora, H01S03 - A Head Full of Dreams, H01S04 - Nuestro, H01S05 - Zyryab, H01S06 - First Impressions..., H01S07 - Name?
    • Regression Bug

    Description

      Due to the LPS-152965, value information given by the REST APIs was lost.

      Steps to reproduce

      • Create a blog with a POST request. For example:

       

      {
        "articleBody": "2",
        "creator": {
          "familyName": "Test",
          "givenName": "Test",
          "id": 20129,
          "name": "Test Test",
          "profileURL": "/web/test"
        },
        "dateCreated": "2019-04-10T23:02:50Z",
        "dateModified": "2019-04-11T14:39:05Z",
        "datePublished": "2019-04-11T14:39:00Z",
        "encodingFormat": "text/html",
        "friendlyUrlPath": "12",
        "headline": "3",
        "id": 63706,
        "numberOfComments": 0,
        "siteId": 20123
      }
      
      • Send the POST request again

      Expected result

       

      The API response with a CONFLICT message and additional information to guide the developer to diagnose why it is failing.

      {
        "status": "CONFLICT",
        "title": "Duplicate friendly URL"
      }
      

      Actual result

       

      The API response just with CONFLICT

      {
        "status": "CONFLICT"
      }
      

      Note that this is happening for all responses that are not 2XX under the headless APIs.

      This makes the development harder as it increases the difficulty to diagnose why is the request failing.

      This could break contracts with clients that are using the response to do some tasks, like showing a warning pop-up with the message.

       

      Attachments

        Issue Links

          Activity

            People

              kevin.wan Kevin Wan
              luismiguel.barco Luis Miguel Barcos
              Sergio Jimenez del Coso Sergio Jimenez del Coso
              Matija Petanjek Matija Petanjek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                20 weeks, 1 day ago

                Packages

                  Version Package
                  7.4.3.60 CE GA60
                  7.4.13 DXP U60
                  Master