Fix error code when client run out of memory in Objective C code base

Update Status Codes documentation
pull/7245/head
Muxi Yan 9 years ago
parent 20caeb182c
commit fc99ff6644
  1. 1
      doc/statuscodes.md
  2. 4
      src/objective-c/GRPCClient/GRPCCall.m

@ -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 |

@ -213,8 +213,8 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey";
// (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 out of memory."}]];
[weakSelf cancelCall];
return;
}

Loading…
Cancel
Save