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

Improve error message for CompanyWebIdException in Portal Instances Headless API

Details

    Description

      After the changes you will get a helpful error message when the portal instance id is incorrect instead of the current BAD_REQUEST error.

      This is the final expected behavior:

      curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"dom
      ain": "liferay.com", "virtualHost": "localhost2", "portalInstanceId": ""}' --header 'Content-Type: appl
      ication/json' -u '[email protected]:test'           
      {
      
        "status" : "BAD_REQUEST",
      
        "title" : "Portal instance id is null"
      
      } 

       

      curl -X 'POST' 'http://localhost:8080/o/headless-portal-instances/v1.0/portal-instances' -d $'{"dom
      ain": "liferay.com", "virtualHost": "localhost2", "portalInstanceId": "liferay.com"}' --header 'Content
      -Type: application/json' -u '[email protected]:test'
      
      {
      
        "status" : "BAD_REQUEST",
      
        "title" : "Duplicate portal instance id liferay.com"
      
      } 

      Attachments

        Activity

          People

            brian.chan Brian Chan
            alberto.chaparro Alberto Chaparro
            Alberto Chaparro Alberto Chaparro
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                Master