bigchaindb / bigchaindb/coalaip-http-api
Registering a right
- Dominant language
- Python
- Stars
- 5
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Just been working my way through the example here and noticed that when creating a right, leaving out the `sourceRightId` causes an application error:
`POST http://localhost:3000/api/v1/rights`
```json
{
"right": {
"license": "My license"
},
"currentHolder": {
"publicKey": "Hrzhm61KQut7Rm2nT1k1f7gGpUWijxsGd8udcPqE5sSK",
"privateKey": "Eiea9RJPRAYqokwVbwr9tw7vt6HWdsZ9TbyFzjaeMdUc"
},
"sourceRightId": ""
}
```
Leaving out any of the other fields results in a 400 with useful information in the body as to why the request was unsuccessful.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the POST request to /api/v1/rights with sourceRightId omitted or empty, then inspect the request validation and error handling for right registration. Compare it with validation for the other fields; done means the request returns HTTP 400 with useful error details instead of an application error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100