azure-sdk-for-java
azure-sdk-for-java copied to clipboard
Validate parameter for each public method in Java SDK
The parameters should be validated and appropriate exceptions should be thrown such as IllegalArgumentException.
The design we've been using for the APIs is to:
- If bad data will cause the SDK code to error in other helper methods, which results in a confusinng client error (see #42), then validate those parameters.
- If bad data causes the SDK to form a bad request, which results in a confusing server error (see #121), then validate those parameter.
- Else, rely on the server to return a sensible error.
In general, most of the APIs abide by these rules. Please file seperate issues for specific classes of problems.
Close this since we should file separate issues for specific problems.