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

fix the failed java unit test related to getBlob. #40

Merged
merged 2 commits into from
Apr 6, 2012

Conversation

gcheng
Copy link

@gcheng gcheng commented Apr 5, 2012

throw an exception if the HTTP status code is not success.

public static void ThrowIfError(ClientResponse r) {
if (r.getStatus() >= 400) {
throw new UniformInterfaceException(r);
public static void ThrowIfNotSuccess(ClientResponse clientResponse) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From grammatical point of view should this be ThrowIfNotSucceed or ThrowIfNotSucceeded. Also ThrowIfFailed would be good name candidate.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the Success is Http Status code according to HTTP standard. Only if the status is 2xx, no exception would be thrown.
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

gcheng pushed a commit that referenced this pull request Apr 6, 2012
fix the failed java unit test related to getBlob.
@gcheng gcheng merged commit e629c80 into Azure:dev-bookmark Apr 6, 2012
joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this pull request Jan 18, 2013
Refactor Job and Task into Crudy API, implementation of Action
joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this pull request Jan 18, 2013
Renamed ...media.implementation.entities to ...media.entityoperations
gcheng pushed a commit that referenced this pull request May 20, 2013
bug fix in CI machine.
jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this pull request Apr 5, 2017
fix the failed java unit test related to getBlob.
jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this pull request Apr 5, 2017
lenala pushed a commit to lenala/azure-sdk-for-java that referenced this pull request Nov 16, 2018
Fix bugs with  message protection for keys create\delete
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this pull request Mar 4, 2019
Java Storage Client Library 2.1.0
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this pull request Mar 4, 2019
Share snapshot fix when getting server response
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this pull request May 30, 2019
navalev pushed a commit to navalev/azure-sdk-for-java that referenced this pull request Dec 24, 2019
samvaity added a commit to samvaity/azure-sdk-for-java that referenced this pull request Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants