[ZBXNEXT-112] user.add should return better error messages Created: 2009 Oct 20  Updated: 2012 Oct 21

Status: Reopened
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: nelsonab Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: usability, validation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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.



 Comments   
Comment by Artem Suharev (Inactive) [ 2009 Oct 29 ]

Error messages will be improved, no doubts, but in time. First things first. =) There is so much work to do!

Comment by Artem Suharev (Inactive) [ 2009 Oct 29 ]

This issue is part of future API development, so I close it.

Comment by richlv [ 2009 Nov 02 ]

valid as a feature request (so that it doesn't get lost)

Generated at Wed Apr 02 14:30:04 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.