-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.2.X, 7.3.X, Master
-
Fix Version/s: 7.2.10 DXP FP10, 7.2.10.4 DXP SP4, 7.2.X, 7.3.10 DXP FP1, 7.3.10.1 DXP SP1, 7.3.6 CE GA7, 7.3.X, 7.4.13 DXP GA1, Master
-
Component/s: Headless Admin Content API
-
Branch Version/s:7.3.x, 7.2.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
Steps to reproduce:
- Create a required Vocabulary 'test' in your site: Asset Type: Web Content Article, Asset Subtype: Basic Web Content.
- Add a category for 'test'.
- Add a new basic web content defining a category.
- Get, using the headless api, the recently created web content. Using, for example, the following service:
GET http://localhost:8080/o/headless-delivery/v1.0/structured-contents/68626
- Add, using the headless api, a new web content defining in the body the same content data obtained from 4 (attached in get_result.json). Using, for example, the following service:
POST http://localhost:8080/o/headless-delivery/v1.0/sites/SITE_ID/structured-contents/
Expected result: Since the POST categoryIds data has an incorrect format, no categories are parsed and an empty array is passed to the JournalArticle service add method. When the cateogories validation is done the service throws a AssetCategoryException.AT_LEAST_ONE_CATEGORY exception because we configured it as required.
We expect an error code with this specific information as a result.
Current result:
A 500 error code (Internal Server Error) is thrown with no specific info:
{ "status": "INTERNAL_SERVER_ERROR" }