-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 8.5.0
-
Component/s: Core - Content REST APIs
-
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.