Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz committed May 12, 2022
1 parent 7fe9ab9 commit 6693e4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gengapic/genrest.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ func (g *generator) restCallOptions(serv *descriptor.ServiceDescriptorProto, ser
sFQN := g.fqn(g.descInfo.ParentElement[m])
mn := m.GetName()
p("%s: []gax.CallOption{", mn)
if rp, ok := c.RetryPolicy(sFQN, mn); ok && rp != nil {
if rp, ok := c.RetryPolicy(sFQN, mn); ok && rp != nil && len(rp.GetRetryableStatusCodes()) > 0 {
p("gax.WithRetry(func() gax.Retryer {")
p(" return gax.OnHTTPCodes(gax.Backoff{")
// this ignores max_attempts
Expand Down

0 comments on commit 6693e4e

Please sign in to comment.