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

Error for wrong type in Objects admin API is not clear

    Details

      Description

      When trying to create an object definition through the API, if the type defined is not valid, the server answers with a 500 error. 

       

      Steps to reproduce:

      1.- Make a POST request to /o/object-admin/v1.0/object-definitions with:

      { "name": "Potato", "objectFields": [ \{ "indexed": true, "indexedAsKeyword": true, "name": "title", "required": true, "type": "string" }

      , { "indexed": true, "indexedAsKeyword": true, "name": "my date", "required": false, "type": "date" }, { "indexed": true, "indexedAsKeyword": true, "name": "description", "required": false, "type": "string" } ] }

      Expected result:
      a 400 error code is returned, saying "type string is not valid. Types should start with capital letters"

      Current result:
      a 500 error code is returned with "type string is not valid"

        Attachments

          Activity

            People

            Assignee:
            rodrigo.cunha Rodrigo Cunha
            Reporter:
            pablo.agulla Pablo Agulla
            Participants of an Issue:
            Recent user:
            Gleice Lisbino
            Engineering Assignee:
            Javier Gamarra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 weeks, 6 days ago

                Packages

                Version Package
                7.4.2 CE GA3 DXP 7,4
                Master