Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.2.X, 7.3.X, Master
-
7.3.x, 7.2.x, 7.1.x
-
Committed
-
3
Description
Internal Server Error (500) is thrown when tags are incorrectly informed within the request body.
Steps to reproduce:
- Add a new tag "tag1".
- Add from the UI a new basic web content selecting "tag1" within its metadata.
- Get, using the headless api, the recently created web content. For example: http://localhost:8080/o/headless-delivery/v1.0/structured-contents/41513
- Add (post), using the headless api, a new webcontent using the obtained (and relevant) data from 3. Change the tag name:
- To an empty string "" (body_data.txt attached).
- To an invalid title "tag&" (body_data2.txt attached).
Expected result: a 400 error (bad request) is obtained in both cases.
Current result: a 500 error (internal server error) is thrown. In the second case, the error title is too ambiguous:
{ "status": "INTERNAL_SERVER_ERROR", "title": "Tag name cannot be an empty string" }
{ "status": "INTERNAL_SERVER_ERROR", "title": "& ' @ \\ ] } : , = > / < \n [ { % | + # ` ? \" \r ; / * ~" }