[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13594648#comment-13594648
 ] 

Rohit Yadav commented on CLOUDSTACK-1417:
-----------------------------------------

Prasanna what do you propose how we handle the errors? Right now the problem is 
in ApiDispatcher which tries to translate OTW api params which are uuid to 
internal ids. In the process we convert using VOs which may have been deleted, 
we only throw exception when it does not exist in the DAO, or on format/syntax 
error. While what I commented may not be useful for this issue, throwing 
exception at ApiDispatcher level can break backward compatibility as earlier we 
used to return empty {} response, but the way I did it (search within deleted 
VOs as well) would save us for most part, but I think it's necessary to throw 
exception and tell user in case there is such an error (syntax or incorrect 
obj/uuid passed).

Sorry for a late reply, this was mostly a cosmetics fix so I delayed it. 
Alright, to solve the stated issue, I can print the annotation name which is 
the field name.
                
> When invalid values are passed to createNetwork() , error message does not 
> indicate the parameter name that has invalid values.
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-1417
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1417
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>    Affects Versions: 4.1.0
>         Environment: Build from 4.1 branch  built on 2/26
>            Reporter: Sangeetha Hariharan
>            Assignee: Rohit Yadav
>             Fix For: 4.1.0
>
>
> When invalid values are passed to createNetwork() , Error message does not 
> indicate the parameter name that has invalid values.
> Steps to reproduce the problem:
> Use createNetwork() by passing invalid value (non existent) for any parameter 
> like zoneId / networkOfferingId/physicalnetworkid. 
> Error message presented to the user does not indicate the parameter name that 
> has invalid values , instead it has the invalid value mentioned in the error 
> string. 
> 2013-02-26 13:55:26,614 INFO  [cloud.api.ApiServer] (catalina-exec-1:null) 
> (userId=2 accountId=2 sessionId=029D24A96FE3B77FBC2C31873D09B594) 
> 10.216.50.206 -- GET 
> command=createNetwork&zoneId=755b2735-6bb2-4778-a37b-f96a8f66a571&networkOfferingId=1b6434ba6-7a43-4504-be22-3903279f59ef&physicalnetworkid=2388ee68-2aa8-4a1b-99e2-6f0fa869c145&name=test1362&displayText=test1362&vlan=1362&acltype=domain&ip6gateway=FC00:3:1362::1&ip6cidr=FC00:3:1362::1/64&startipv6=FC00:3:1362::2&endipv6=FC00:3:1362::FFFF:FFFF:FFFF:FFFF&networkdomain=hello1362&response=json&sessionkey=3fceZn%2B25ajs1zG25XlIYoX1zX0%3D
>  431 Unable to execute API command createnetwork due to invalid value. 
> Invalid parameter value=1b6434ba6-7a43-4504-be22-3903279f59ef due to 
> incorrect long value format, or entity was not found as it may have been 
> deleted, or due to incorrect parameter annotation for the field in api cmd.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to