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

            rodrigo.cunha Rodrigo Cunha (Inactive)
            pablo.agulla Pablo Agulla
            Kiyoshi Lee Kiyoshi Lee
            Javier Gamarra Javier Gamarra (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 9 weeks, 5 days ago

              Packages

                Version Package
                7.4.2 CE GA3 DXP 7,4
                7.4.13 DXP GA1
                7.4.3.4 CE GA4
                Master