Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate parameter for each public method in Java SDK #137

Closed
gcheng opened this issue Jul 17, 2012 · 2 comments
Closed

Validate parameter for each public method in Java SDK #137

gcheng opened this issue Jul 17, 2012 · 2 comments
Milestone

Comments

@gcheng
Copy link

gcheng commented Jul 17, 2012

The parameters should be validated and appropriate exceptions should be thrown such as IllegalArgumentException.

@jcookems
Copy link
Contributor

The design we've been using for the APIs is to:

  1. If bad data will cause the SDK code to error in other helper methods, which results in a confusinng client error (see if you delete a cloudQueueMessage with a different cloudQueue instance, null pointer occurs #42), then validate those parameters.
  2. If bad data causes the SDK to form a bad request, which results in a confusing server error (see Queue: createMessage should throw for null message instead of submitting #121), then validate those parameter.
  3. 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.

@guangyang
Copy link
Contributor

Close this since we should file separate issues for specific problems.

navalev pushed a commit to navalev/azure-sdk-for-java that referenced this issue Dec 24, 2019
Generate service plane in com.azure.search via autorest.java v3
Stubs for SearchServiceClient and SearchServiceClientBuilder
Delete azure-search-service
Update autorest configuration
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants