Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

Error handling when creating organization #123

Closed eglute closed 3 years ago

eglute commented 3 years ago

Currently, when creating organization, if one of the inputs is incorrect, the error returned is only

'101': 'Data type of the input(s) is not valid',

Instead of specifying which of the inputs is invalid. For example, email_domain when adding organization should be a list, but if a single email is passed, the message returned doesn't specify which field out of 10 possible was incorrect.

spakhare commented 3 years ago

Hi @eglute,

That is by the design of this module. We are expecting users to refer to the method docstrings to get the details on the user input. That would give them more details on the expected output and possible exception scenarios.

Thanks

eglute commented 3 years ago

Hello @spakhare it might be by design, but if I am passing 10 inputs, it would be very helpful to know which field failed validation.

spakhare commented 3 years ago

Hi @eglute,

I might not be able to make this change immediately but we can look at possibilities in future updates. Thanks for your feedback on this.

Thanks

eglute commented 3 years ago

Thank you @spakhare!