Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
Ignore 404 response on /locales endpoint
Browse files Browse the repository at this point in the history
Apparently there are cases where this happens even when people can
access the space just fine. So we'll treat this as a space without
locales and a default of `en-US`.
  • Loading branch information
neonichu committed Jul 20, 2016
1 parent f5ab04a commit affdc0c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Pod/Code/CMAClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,19 @@ -(CDARequest *)fetchSpaceWithIdentifier:(NSString *)identifier
if (success) {
success(response, space);
}
} failure:failure];
} failure:^(CDAResponse *response,
NSError *error) {
if (response.statusCode == 404) {
if (success) {
success(response, space);
}
return;
}

if (failure) {
failure(response, error);
}
}];
}
failure:failure];
}
Expand Down

0 comments on commit affdc0c

Please sign in to comment.