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

Queue: createMessage should throw for null message instead of submitting #121

Closed
joostdenijs opened this issue Jul 16, 2012 · 2 comments
Closed

Comments

@joostdenijs
Copy link
Contributor

Dev estimate: 1
Test estimate: 1

Moved from private repository.

This code:
QueueContract service = createService();
service.createMessage("foo", null);
submits this XML to the server:

But the server doesn't like that:
InvalidXmlDocument: XML specified is not syntactically valid.
LineNumber: 0
LinePosition: 0
Would be nice to throw immediately instead of requiring the user to parse through the ServiceException themselves.

Similar issue for updateMessage when PopReciept is null: popreceiptquery parameter is required

@gcheng
Copy link

gcheng commented Mar 11, 2013

from @jcookems

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.

@jcookems
Copy link
Contributor

Looks good. Unit tests are sufficient.

gcheng pushed a commit that referenced this issue Jun 25, 2013
implementation for multiple property filter
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this issue Mar 4, 2019
Fixing bug in getShareQuota and removing unnecessary code.
navalev pushed a commit to navalev/azure-sdk-for-java that referenced this issue Dec 24, 2019
)

Replace IndexBatchBuilder with fluent IndexBatch
Remove single document client methods
Remove unnecessary generic on index client methods
Accept Iterable<?> in index client methods
@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