Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-112

user.add should return better error messages

    XMLWordPrintable

    Details

    • Type: Change Request
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API (A)

      Description

      From the CLI tool

      add user passwd=bla
      *Debug(7)* parse_input: add user passwd=bla
      ["passwd=bla"]
      {:command=>:adduser, :parameters=>{"passwd"=>"bla"}}
      *Debug(10)* json_obj: json_obj: authe29c821d61cc1fa597359c4df0df9ce3id2methoduser.addparamspasswdblajsonrpc2.0
      *Debug(8)* do_request: Sending: {"auth":"e29c821d61cc1fa597359c4df0df9ce3","id":2,"method":"user.add","params":[

      {"passwd":"bla"}

      ],"jsonrpc":"2.0"}
      *Debug(8)* do_request: Response Code: 200
      *Debug(8)* do_request: Response Body: {"jsonrpc":"2.0","error":

      {"code":-32500,"message":"Application error.","data":"Incorrect parameters pasted to method [ user.add ]"}

      ,"id":2}
      An error was received from the Zabbix server
      Error code: -32500
      Error message: Application error.
      Error data: Incorrect parameters pasted to method [ user.add ]

      The error message returned is overly simplistic. In this case something to the effect of what fields are required would be useful.

      Also as an aside, pasted? Perhaps "Incorrect parameter for method [user.add", just a thought.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            redtux nelsonab
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: