Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
Istanbul Release
-
None
Description
Expected behaviour:
- When sending a request to update a node leave, either
- the request is successfully proceeded and response code is 2xx
- or client request is not valid and response code is 4xx with a meaningful explanation of the reason why the request is not valid.
Actual behaviour:
- Request is not proceeded and response code is 500
Steps to reproduce:
1. Create a dataspace:
curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces?dataspace-name=bsa-dataspace-7' \-H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE='
2. Create a schema set with attached bookstore.yang
curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces/bsa-dataspace-7/schema-sets' \-H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \-F 'file=@"/bookstore.yang"' \-F 'schema-set-name="bsa-schema-set"'
3. Create an anchor
curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces/bsa-dataspace-7/anchors?schema-set-name=bsa-schema-set&anchor-name=bsa-anchor' \ -H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE='
4. Add a node
curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces/bsa-dataspace-7/anchors/bsa-anchor/nodes' \ -H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \ -H 'Content-Type: application/json' \ --data-raw '{ "bookstore":{ "bookstore-name": "Chapters", "categories": [ { "code": "01", "name": "SciFi", "books": [ { "authors": [ "Iain M. Banks" ], "lang": "en", "price": "895", "pub_year": "1994", "title": "Feersum Endjinn" }, { "authors": [ "Ursula K. Le Guin", "Joe Haldeman", "Orson Scott Card", "david Brin", "Rober Silverberg", "Dan Simmons", "Greg Bear" ], "lang": "en", "price": "1099", "pub_year": "1999", "title": "Far Horizons" } ] }, { "name": "kids", "code": "02", "books": [ { "authors": [ "Philip Pullman" ], "lang": "en", "price": "699", "pub_year": "1995", "title": "The Golden Compass" } ] } ] } } '
5. Update a node leaf:
curl -g -X PATCH 'http://localhost:8080/cps/api/v1/dataspaces/bsa-dataspace-7/anchors/bsa-anchor/nodes?xpath=/bookstore/categories[@code=%2701%27]' \-H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \-H 'Content-Type: application/json' \--data-raw '{ "name": "bsa"}'
Http response is:
{ "status": "500 INTERNAL_SERVER_ERROR", "message": null, "details": "Check logs for details." }
See error.log for the logs
Attachments
Issue Links
# | Subject | Branch | Project | Status | CR | V |
---|---|---|---|---|---|---|
122037,2 | Updating exception and explanation for update node leaves | master | cps | Status: MERGED | +2 | +1 |
122075,2 | Updating release notes for update datanode leaves limitaions | master | cps | Status: MERGED | +2 | +1 |