Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31786

Better validation / status code on missing JSON Request on /api/ezp/v2/user/sessions

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2.5.11
    • Platform > REST API v2
    • None

    Description

      Response:

      Given I am on : /api/ezp/v2/user/sessions an calling the rest-Api
      then I want to see following response on posting empty body.
      {
          "ErrorMessage": {
              "_media-type": "application\/vnd.ez.api.ErrorMessage+json",
              "errorCode": 422,
              "errorMessage": "Unprocessable Entity",
              "errorDescription": "Request Body is empty"
          }
      }
      
      instead of current response:
      
      {   "ErrorMessage":{      "_media-type":"application\/vnd.ez.api.ErrorMessage+json",
            "errorCode":400,
            "errorMessage":"Bad Request",
            "errorDescription":"An error occured while decoding the JSON       input:\nSyntax error\nInput JSON:\n\n"
         }
      }
      
      
       
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pebo pebo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: