Skip to content

Commit

Permalink
serviceconfig: Return errors instead of skipping invalid retry policy…
Browse files Browse the repository at this point in the history
… config
  • Loading branch information
dfawley committed Dec 5, 2024
1 parent 645aadf commit 2574a1a
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 53 deletions.
3 changes: 1 addition & 2 deletions service_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ func convertRetryPolicy(jrp *jsonRetryPolicy, maxAttempts int) (p *internalservi
jrp.MaxBackoff <= 0 ||
jrp.BackoffMultiplier <= 0 ||
len(jrp.RetryableStatusCodes) == 0 {
logger.Warningf("grpc: ignoring retry policy %v due to illegal configuration", jrp)
return nil, nil
return nil, fmt.Errorf("invalid retry policy (%v): ", jrp)
}

if jrp.MaxAttempts < maxAttempts {
Expand Down
Loading

0 comments on commit 2574a1a

Please sign in to comment.