Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-6939

Better handling of invalid requests

    Details

    • Type: Task
    • Status: Resolved
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Return more meaningful errors when receiving invalid requests

      Invalid content type:

      $ curl -i  localhost:8080/v2/apps --data-binary garbage
      HTTP/1.1 415 Unsupported Media Type
      Content-Type: application/json
      Transfer-Encoding: chunked
      Server: Jetty(8.1.11.v20130520)
      
      {"message":"Unsupported Media Type"}
      

      Invalid JSON:

      $ curl -i -H 'Content-Type: application/json' localhost:8080/v2/apps --data-binary garbage
      HTTP/1.1 400 Bad Request
      Content-Type: application/json
      Transfer-Encoding: chunked
      Server: Jetty(8.1.11.v20130520)
      
      {"message":"Unrecognized token 'garbage': was expecting ('true', 'false' or 'null')"}
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              GitHub_guenter Tobi Knaup (Inactive)
              Team:
              Orchestration Team
              Watchers:
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: