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

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 2.5.11
    • Fix Version/s: None
    • Component/s: Platform > REST API v2
    • Labels:
      None
    • Environment:

      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

            Assignee:
            Unassigned
            Reporter:
            pebo Peter Böthig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: