Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
5.2-dev
-
Server OS: Red Hat 6.4
PHP: 5.3.3
Database: MySQL 5.1.61
Browser: Firefox Server
Description
As it can be seen in EZP-21053 , when creating content type with FieldDefinition empty we get different error descriptions for XML and JSON
Error with XML:
{ "ErrorMessage": { "_media-type": "application/vnd.ez.api.ErrorMessage+json", "errorCode": 400, "errorMessage": "Bad Request", "errorDescription": "Invalid 'FieldDefinitions' element for ContentTypeCreate.", "file": "/var/www/ezp5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/ContentType.php", "line": 306 } }
Error with JSON
{ "ErrorMessage": { "_media-type": "application/vnd.ez.api.ErrorMessage+json", "errorCode": 400, "errorMessage": "Bad Request", "errorDescription": "ContentTypeCreate should provide at least one field definition.", "file": "/var/www/ezp5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/REST/Server/Controller/ContentType.php", "line": 306 } }
Attachments
Issue Links
- relates to
-
EZP-21053 REST v2: 403 error when using an empty FieldDefinition element in a JSON request
- Closed