Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1256

Misleading error message with unknown module name in URL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • None
    • None
    • restconf
    • None
    • Operating System: All
      Platform: All

    • 3010
    • Normal

      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).

            Unassigned Unassigned
            tpantelis Tom Pantelis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: