Skip to content

Commit

Permalink
set status code 202 to be considered a success
Browse files Browse the repository at this point in the history
  • Loading branch information
ms1752 committed Sep 2, 2014
1 parent 62f475c commit d9655b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ClearBladeAPI/CBHTTPRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ -(void)executeWithSuccessCallback:(CBHTTPRequestSuccessCallback)successCallback
if (errorCallback) {
errorCallback(requestResponse, connectionError);
}
} else if (httpResponse.statusCode != 200) {
} else if (httpResponse.statusCode != 200 && httpResponse.statusCode != 202) {
connectionError = [NSError errorWithDomain:[@"Unable to complete request because " stringByAppendingString:requestResponse.responseString]
code:httpResponse.statusCode
userInfo:nil];
Expand Down Expand Up @@ -300,7 +300,7 @@ -(NSData *)executeWithError:(NSError *__autoreleasing *)error {
[self.settings logExtra:@"Executed Request with Response\n%@\n\n", response];
if (requestError) {
*error = requestError;
} else if (requestResponse.statusCode != 200) {
} else if (requestResponse.statusCode != 200 && requestResponse.statusCode != 202) {
*error = [NSError errorWithDomain:@"Request failed because of statusCode" code:requestResponse.statusCode userInfo:nil];
} else {
return requestData;
Expand Down

0 comments on commit d9655b3

Please sign in to comment.