Skip to content

Commit

Permalink
Merge pull request grpc#7245 from muxi/fix-7181
Browse files Browse the repository at this point in the history
Fix of Issue grpc#7181 documentation and Objective C code
  • Loading branch information
makdharma authored Jul 18, 2016
2 parents f3f5c18 + 3b67f36 commit 2eebe29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/statuscodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Only a subset of the pre-defined status codes are generated by the gRPC librarie
| Could not decompress, but compression algorithm supported (Server -> Client) | INTERNAL | Client |
| Compression mechanism used by client not supported at server | UNIMPLEMENTED | Server |
| Server temporarily out of resources (e.g., Flow-control resource limits reached) | RESOURCE_EXHAUSTED | Server|
| Client does not have enough memory to hold the server response | RESOURCE_EXHAUSTED | Client |
| Flow-control protocol violation | INTERNAL | Both |
| Error parsing returned status | UNKNOWN | Client |
| Incorrect Auth metadata ( Credentials failed to get metadata, Incompatible credentials set on channel and call, Invalid host set in `:authority` metadata, etc.) | UNAUTHENTICATED | Both |
Expand Down
8 changes: 2 additions & 6 deletions src/objective-c/GRPCClient/GRPCCall.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,9 @@ - (void)startNextRead {
// don't want to throw, because the app shouldn't crash for a behavior
// that's on the hands of any server to have. Instead we finish and ask
// the server to cancel.
//
// TODO(jcanizales): No canonical code is appropriate for this situation
// (because it's just a client problem). Use another domain and an
// appropriately-documented code.
[weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain
code:GRPCErrorCodeInternal
userInfo:nil]];
code:GRPCErrorCodeResourceExhausted
userInfo:@{NSLocalizedDescriptionKey: @"Client does not have enough memory to hold the server response."}]];
[weakSelf cancelCall];
return;
}
Expand Down

0 comments on commit 2eebe29

Please sign in to comment.