| Index: grpc/prpc/client.go
|
| diff --git a/grpc/prpc/client.go b/grpc/prpc/client.go
|
| index db6e000fa274b86f644138615208d851fbd643a9..cac2b7da70e4da2c3b983734917ad631b799f5ba 100644
|
| --- a/grpc/prpc/client.go
|
| +++ b/grpc/prpc/client.go
|
| @@ -229,7 +229,16 @@ func (c *Client) CallRaw(ctx context.Context, serviceName, methodName string, in
|
| if len(body) > bodySize {
|
| body = body[:bodySize] + "..."
|
| }
|
| - return fmt.Errorf("HTTP %d: no gRPC code. Body: %q", res.StatusCode, body)
|
| + err := fmt.Errorf("HTTP %d: no gRPC code. Body: %q", res.StatusCode, body)
|
| +
|
| + // Some HTTP codes are returned directly by hosting platforms (e.g.,
|
| + // AppEngine), and should be automatically retried even if a gRPC code
|
| + // header is not supplied.
|
| + switch res.StatusCode {
|
| + case http.StatusInternalServerError, http.StatusServiceUnavailable:
|
| + err = errors.WrapTransient(err)
|
| + }
|
| + return err
|
| }
|
|
|
| codeInt, err := strconv.Atoi(codeHeader)
|
|
|