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

user.add should return better error messages

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • API (A)

      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.

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

              Created:
              Updated: