Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

adding a reviewer via rest without content-type produces 500 error

Christian Bongiorno March 5, 2020

I hate PUT for these kinds of operations - PATCH is what you want because not all parts of the entity are mutable. Someone wanna give me viable fields available with PUT? Anyways:

 

reviewers.json

{
"description": "Hello?",
"title": "CHB0",
"reviewers": [
{
"uuid": "{1492c667-c0c5-4a6c-bf48-496d9985df2d}"
}
],
"id": 905,
"participants": [],
"merge_commit": null,
"closed_by": null
}
curl -snL -X PUT https://api.bitbucket.org/2.0/repositories/twengg/sterlingone_databases/pullrequests/905 -d @reviewers.json
{"type": "error", "error": {"message": "Something went wrong", "id": "515e2f4b32ba45c59848fbee1b653175"}}

This produces 500. 

When I supply the content-type, then it works. 


 curl -sfnL -X PUT -H 'content-type: application/json' https://api.bitbucket.org/2.0/repositories/twengg/sterlingone_databases/pullrequests/905 -d @reviewers.json 
{"rendered": {"description": {"raw": "Hello?", "markup": "markdown", "html": "<p>Hello?</p>", "type": "rendered"}, "title": {"raw": "CHB0", "markup": "markdown", "html": "<p>

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events