-
Type:
Bug
-
Resolution: Not a bug
-
Priority:
Low
-
None
-
Affects Version/s: 6.10.0, 6.8.2
-
Component/s: API - REST
-
None
-
1
-
Severity 3 - Minor
Issue Summary
REST API returns a wrong response when creating a branch with more than 100 characters.
The maximum character length is 100. Refer to https://jira.atlassian.com/browse/BSERV-8631. Tested on Bitbucket version 6.8.2.
Steps to Reproduce
Execute the following REST API (modify the username, password, and URL accordingly)
curl -X POST -u marini:pwd -v -d '{"name": "my-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchm1","startPoint": "26b6df5a863332a028e0f7030ea1339412b47859","message": "This is my branch"
> }' -H "Content-Type: application/json" http://localhost:7990/rest/api/1.0/projects/CEN/repos/booking/branches
Expected Results
The output should be the following:
{
"errors":[
{
"context":null,
"message":"The ref name, once fully qualified, is limited to 100 characters.",
"exceptionName":"com.atlassian.bitbucket.repository.InvalidRefNameException",
"refName":"my-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branttttt"
}
]
}
Actual Results
{
"errors":[
{
"context":null,
"message":"The ref name, once fully qualified, is limited to 111 characters.",
"exceptionName":"com.atlassian.bitbucket.repository.InvalidRefNameException",
"refName":"my-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branchmy-branttttt"
}
]
}
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available
- has a derivative of
-
BSERV-12227 Improve create branch REST API error message for ref names that are too long
- Closed