[NETCONF-23] netconf: Un-helpful error message presented when no service provider is there to handle the RPC call. Created: 17/Apr/15  Updated: 15/Mar/19  Resolved: 07/Jan/16

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Phillip Shea Assignee: Martin Ciglan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All
URL: https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Starting_A_Project:ch2


External issue ID: 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.



 Comments   
Comment by Jan Hajnar [ 25/Jun/15 ]

patch that adds catch for rpc not implemented exception:
https://git.opendaylight.org/gerrit/#/c/23277/

Comment by Robert Varga [ 13/Nov/15 ]

Move to NETCONF project

Comment by Tomas Cere [ 24/Nov/15 ]

Needs to be ported to Netconf repo

Comment by Tomas Cere [ 21/Dec/15 ]

port to netconf repo:
https://bugs.opendaylight.org/show_bug.cgi?id=3015

Comment by Tomas Cere [ 21/Dec/15 ]

bad link:
https://git.opendaylight.org/gerrit/#/c/31695/

Generated at Wed Feb 07 20:13:58 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.