[CONTROLLER-1256] Misleading error message with unknown module name in URL Created: 17/Apr/15  Updated: 25/Jul/23  Resolved: 01/May/15

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Tom Pantelis Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 3010
Priority: Normal

 Description   

If you go a GET to http://localhost:8181/restconf/config/foo:foo, the error info is returned:

error-type: "protocol"
error-tag: "invalid-value"
error-message: "URI has bad format"

The error message indicates incorrect format or syntax in the URL which is misleading because the format is correct. The problem is that the "foo" module name doesn't exist so it should say something like "The module name "foo" does not exist.".

Also if you do PUT to the same URL, you get error info:

error-type: "protocol"
error-tag: "malformed-message"
error-message: "Error parsing input: errors: [error-type: protocol, error-tag: invalid-value, error-message: URI has bad format]]"

You actually get the same error-info however it's embedded in the enclosing error-message. This is a bit funky. Also "malformed-message" and "Error parsing input: ..." are technically incorrect because I didn't specify any input. Even if I do specify some output, I get the same error info. I would expect the same error info reported as GET (and DELETE).



 Comments   
Comment by Tom Pantelis [ 01/May/15 ]

Submitted https://git.opendaylight.org/gerrit/#/c/19448/.

Generated at Wed Feb 07 19:55:04 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.