Details
-
Bug
-
Resolution: Fixed
-
Low
-
None
-
None
-
Severity 3 - Minor
-
Description
Using the Stash REST API and sending POST or PUT requests, if the JSON payload is not formated correctly the Stash server returns HTTP 500 instead of HTTP 400.
- STEPS TO REPRODUCE
curl -H "Authorization: Basic ..." -H "Content-Type: application/json" -X PUT -d ' " {hook-url-0" : "some-url"}' 'https://example.com/rest/api/1.0/projects/
{projectKey}/repos/
{repositorySlug}/settings/hooks/
{hookKey}/enabled
Note that the payload is not correct JSON.
- RESULTS
Stash returns
HTTP/1.1 500 Internal Server Error
{
"errors": [ { "context": null, "exceptionName": null, "message": "An error occurred while processing the request. Check the server logs for more information." }]
}
Stash should return,
400 Bad Request
Attachments
Issue Links
- mentioned in
-
Page Loading...