500 error instead of 400 for invalid request

XMLWordPrintable

    • Severity 3 - Minor

      Problem
      Making an invalid request to 

      /:spaceKey/content/:type 

      returns 500 Internal Server Error response instead of 400 Bad Request.

      Steps to reproduce: use spaceKey as valid space key but use type as random non supported type for example "abc" , the request will fail with 500 instead of 400. 

      Curl : 

      curl --location 'https://instenv-318820-tq6j.instenv.internal.atlassian.com/rest/api/space/ASRT/content/page2' \--header 'Accept: application/json' \--header 'Authorization: ••••••' 

      Response: 

      {    "statusCode": 500,    "message""",    "reason": "Internal Server Error",    "_links": {        "base": "https://instenv-318820-tq6j.instenv.internal.atlassian.com",        "context": ""    }} 

       

      SpaceResource - contentWithType validation for type attribute is missing.

              Assignee:
              Saquia Naz
              Reporter:
              Anshul Chokhani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: