Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
URL: https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Starting_A_Project:ch2
-
3015
Description
This was uncovered during execution of the Core Functionality Tutorials, Chapter 2.
In the tutorial, an RPC call is made to a service provider before that code has been added.
The expected response is:
"error-type": "rpc",
"error-tag": "operation-not-supported",
"error-message": "No implementation for this operation is available."
When this call is made:
curl -H 'Content-Type: application/json' -X POST -d '{"input" : {"toaster:toasterDoneness" : "10","toaster:toasterToastType":"wheat-bread"}}' --verbose -u admin:admin http://localhost:8181/restconf/operations/toaster:make-toast
The response is:
"error-type":"application",
"error-tag":"operation-failed",
"error-message":"The operation encountered an unexpected error while executing."
This error message does not lead the developer to the cause of the error message.
Also, if there's a typo in the URL as follows:
curl -H 'Content-Type: application/json' -X POST -d '{"input" : {"toaster:toasterDoneness" : "10","toaster:toasterToastType":"wheat-bread"}}' --verbose -u admin:admin http://localhost:8181/restconf/operations/toaster:toaster
The error message is:
"error-type":"protocol",
"error-tag":"malformed-message",
"error-message":"Error parsing input: Schema node with name input wasn't found."
"malformed-message" is technically incorrect as the message is valid JSON syntax.