-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: Master
-
Fix Version/s: 7.4.3.6 CE GA6, 7.4.13 DXP U2, 7.4.3.7 CE GA7, 7.4.13 DXP U3, Master
-
Component/s: Headless Delivery API
-
Fix Priority:2
-
Sprint:S04E30 - Sea Change
-
Git Pull Request:
When you don't provide content fields in a structured content of a content structure with no required fields, a NullPointerException is thrown when the field has no default value.
Steps to reproduce:
- Create a Web Content Structure with one non-required field and no default value (or use Basic Web Content)
- Create a Structured Content through APIs sending a request with only title and contentStructureId
curl -H "Content-Type: application/json" -X POST "http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents" -d "{\"contentStructureId\": {contentStructureId}, \"title\": \"Test Article\"}" -u "[email protected]:test"
Remember to replace the {siteId} in the path and the {contentStructureId} in the body with valid ids in your portal instance
Result: A 500 Internal Server Error status code is returned and a NullPointerException is logged in the server
Expected Result: The Structured Content is created successfully and a 200 status code is returned